single-label rawframes annotation txt file #2260
Unanswered
robostoneDK
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I have a question regarding the formatting of the annotation file.
Does the label number start with 0 or 1?
Say my label_map.txt looks like this
Playing
Studying
Should my label.txt file look like this (first approach)?
path/video1_frames 45 0
path/video2_frames 97 1
path/video3_frames 33 0
....
or like this(second approach?
path/video1_frames 45 1
path/video2_frames 97 2
path/video3_frames 33 1
....
When training the Timesfomer action recognrion, the first approach allows me to train, but my mean_acc ends up being 0.5
The second approach won't even let me train, as I get this error message:
/pytorch/aten/src/ATen/native/cuda/Loss.cu:247: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [0,0,0] Assertion
t >= 0 && t < n_classes
failed.THCudaCheck FAIL file=../aten/src/THC/THCCachingHostAllocator.cpp line=280 error=710 : device-side assert triggered
Traceback (most recent call last):
File "tools/train.py", line 222, in
main()
File "tools/train.py", line 210, in main
train_model(
File "/home/user/Desktop/mmaction2/mmaction2/mmaction/apis/train.py", line 232, in train_model
runner.run(data_loaders, cfg.workflow, cfg.total_epochs, **runner_kwargs)
File "/home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 53, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "/home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 31, in run_iter
outputs = self.model.train_step(data_batch, self.optimizer,
File "/home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 77, in train_step
return self.module.train_step(*inputs[0], kwargs[0])
File "/home/user/Desktop/mmaction2/mmaction2/mmaction/models/recognizers/base.py", line 309, in train_step
loss, log_vars = self._parse_losses(losses)
File "/home/user/Desktop/mmaction2/mmaction2/mmaction/models/recognizers/base.py", line 255, in _parse_losses
log_vars[loss_name] = loss_value.item()
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
terminate called after throwing an instance of 'c10::CUDAError'
what(): CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Exception raised from create_event_internal at ../c10/cuda/CUDACachingAllocator.cpp:1211 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x42 (0x7f38478ffd62 in /home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/torch/lib/libc10.so)
frame #1: + 0x1c5f3 (0x7f3847b625f3 in /home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/torch/lib/libc10_cuda.so)
frame #2: c10::cuda::CUDACachingAllocator::raw_delete(void) + 0x1a2 (0x7f3847b63002 in /home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/torch/lib/libc10_cuda.so)
frame #3: c10::TensorImpl::release_resources() + 0xa4 (0x7f38478e9314 in /home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/torch/lib/libc10.so)
frame #4: + 0x29adb9 (0x7f384865cdb9 in /home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/torch/lib/libtorch_python.so)
frame #5: + 0xae0c91 (0x7f3848ea2c91 in /home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/torch/lib/libtorch_python.so)
frame #6: THPVariable_subclass_dealloc(_object) + 0x292 (0x7f3848ea2f92 in /home/user/Desktop/mmaction2/m-env/lib/python3.8/site-packages/torch/lib/libtorch_python.so)
frame #7: python3() [0x5ce863]
frame #8: python3() [0x5d176c]
frame #9: python3() [0x5ae9ca]
frame #10: python3() [0x5ae9ca]
frame #11: python3() [0x5ecd90]
frame #12: python3() [0x5447b8]
frame #13: python3() [0x54480a]
frame #14: python3() [0x54480a]
frame #15: python3() [0x54480a]
frame #16: python3() [0x54480a]
frame #17: python3() [0x54480a]
frame #18: python3() [0x54480a]
frame #24: __libc_start_main + 0xf3 (0x7f384eb60083 in /lib/x86_64-linux-gnu/libc.so.6)
Aborted
Beta Was this translation helpful? Give feedback.
All reactions