mmaction2
mmaction2 copied to clipboard
Train own custom dataset with PoseC3D
The doc issue
I followed the steps here https://github.com/open-mmlab/mmaction2/blob/main/configs/skeleton/posec3d/custom_dataset_training.md When I run python ntu_pose_extraction.py some_video_from_my_dataset.mp4 some_video_from_my_dataset.pkl I get the following error
Traceback (most recent call last):
File "tools\data\skeleton\ntu_pose_extraction.py", line 281, in CocoDataset in mmdet/datasets/coco.py: 'mmdet.LoadImageFromFile is not in the transform registry. Please check whether the value of mmdet.LoadImageFromFile is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module'"
But I have installed the latest version, how can I solve this error.
Then I want to ask, after fixing this problem, I will get a lot of .pkl, how can I merge them and then can I use them for training after merging?
But I don’t have labeled actions in videos, so how can I learn what actions are in training?
Suggest a potential alternative/fix
No response
Hi, @Yu-0920
LoadImageFromFilehas been removed in mmdet, you could modifymmdet.LoadImageFromFiletoLoadImageFromFileindemo/demo_configs/faster-rcnn_r50-caffe_fpn_ms-1x_coco-person.py.- you can load the pickle file with
mmengine.loadand concatenate them as a list, following the specified format. - MMAction2 currently only supports supervised training, which means you need to annotate your dataset
Hi, @cir7
After modify mmdet.LoadImageFromFile to LoadImageFromFile in demo/demo_configs/faster-rcnn_r50-caffe_fpn_ms-1x_coco-person.py , I got the following error:
Loads checkpoint by http backend from path: https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person/faster_rcnn_r50_fpn_1x_coco-person_20201216_175929-d022e227.pth
Performing Human Detection for each frame
[ ] 0/589, elapsed: 0s, ETA:05/14 05:46:45 - mmengine - WARNING - "FileClient" will be deprecated in future. Please use io functions in https://mmengine.readthedocs.io/en/latest/api/fileio.html#file-io
05/14 05:46:45 - mmengine - WARNING - "HardDiskBackend" is the alias of "LocalBackend" and the former will be deprecated in future.
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 589/589, 33.7 task/s, elapsed: 17s, ETA: 0s
Loads checkpoint by http backend from path: https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth
C:\Users\Users\anaconda3\envs\mmaction\lib\site-packages\mmpose\apis\inference.py:118: UserWarning: Can not load dataset_meta from the checkpoint or the model config. Use COCO metainfo by default.
warnings.warn('Can not load dataset_meta from the checkpoint or the '
C:\Users\Users\anaconda3\envs\mmaction\lib\site-packages\mmpose\datasets\datasets\utils.py:102: UserWarning: The metainfo config file "configs/base/datasets/coco.py" does not exist. A matched config file "C:\Users\Users\anaconda3\envs\mmaction\lib\site-packages\mmpose.mim\configs_base_\datasets\coco.py" will be used instead.
warnings.warn(
Performing Human Pose Estimation for each frame
[ ] 0/589, elapsed: 0s, ETA:C:\Users\Users\anaconda3\envs\mmaction\lib\site-packages\mmcv\transforms\loading.py:69: DeprecationWarning: "file_client_args" will be deprecated in future. Please use "backend_args" instead
warnings.warn(
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 589/589, 21.4 task/s, elapsed: 28s, ETA: 0s
Traceback (most recent call last):
File "tools/data/skeleton/ntu_pose_extraction.py", line 281, in
How can I solve this error, thanks for your reply.
We have fixed the script in #2402 , you could try it, and we will merge it into the main branch soon.
hi, @cir7 , I have used posec3d to train my own dataset, but during the training and testing processes, I found it use the mmengine.runner function. I want to use the obtained ckt file to predict the input video or pkl file. Is there a way to achieve it? Thanks for your reply