open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.32k stars 1.25k forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'data/ava/annotations/ava_dense_proposals_val.FAIR.recall_93.9.pkl' #2727

Open 15598003953 opened 1 year ago

15598003953 commented 1 year ago

Branch

main branch (1.x version, such as v1.0.0, or dev-1.x branch)

Prerequisite

Environment

pytorch=1.12.1 python=3.8 cuda=11.6 mmcv=2.0.1 mmengine=0.90 mmdet=3.2.0

Describe the bug

This error occurred when I first deployed the model and wished to test it

Reproduces the problem - code sample

parser.add_argument( '--config', default=( r'D:\CODE\mmaction2-main\configs\detection\slowfast\slowfast_r50-k400-pre-temporal-max-focal-alpha3-gamma1_8xb6-8x8x1-cosine-10e_ava22-rgb.py' ), help='spatio temporal detection config file path') parser.add_argument( '--checkpoint', default=(r'D:\CODE\mmaction2-main\weights\slowfast_r50_8xb8-8x8x1-256e_kinetics400-rgb_20220818-1cb6dfc8.pth'), help='spatio temporal detection checkpoint file/url') parser.add_argument( '--action-score-thr', type=float, default=0.4, help='the threshold of human action score') parser.add_argument( '--det-config', default=r'D:\CODE\mmaction2-main\mmdetection-main\configs\yolox\yolox_l_8xb8-300e_coco.py', help='human detection config file path (from mmdet)') parser.add_argument( '--det-checkpoint', default=(r'D:\CODE\mmaction2-main\weights\yolox_l_8x8_300e_coco_20211126_140236-d3bd2b23.pth'), help='human detection checkpoint file/url') parser.add_argument( '--det-score-thr', type=float, default=0.7, help='the threshold of human detection score') parser.add_argument( '--input-video', default=r'D:\CODE\mmaction2-main\demo\test_video_structuralize.mp4', type=str, help='webcam id or input video file/url') parser.add_argument( '--label-map', default=r'D:\CODE\mmaction2-main\tools\data\ava\label_map.txt', help='label map file') parser.add_argument( '--device', type=str, default='cuda:0', help='CPU/CUDA device option')

Reproduces the problem - command or script

run

Reproduces the problem - error message

D:\Anaconda3\envs\mmact2\python.exe D:/CODE/mmaction2-main/demo/webcam_demo_spatiotemporal_det.py Loads checkpoint by local backend from path: D:\CODE\mmaction2-main\weights\yolox_l_8x8_300e_coco_20211126_140236-d3bd2b23.pth Loads checkpoint by local backend from path: D:\CODE\mmaction2-main\weights\slowfast_r50_8xb8-8x8x1-256e_kinetics400-rgb_20220818-1cb6dfc8.pth The model and loaded state dict do not match exactly

unexpected key in source state_dict: cls_head.fc_cls.weight, cls_head.fc_cls.bias

missing keys in source state_dict: roi_head.bbox_head.fc_cls.weight, roi_head.bbox_head.fc_cls.bias

Traceback (most recent call last): File "D:/CODE/mmaction2-main/demo/webcam_demo_spatiotemporal_det.py", line 857, in main(parse_args()) File "D:/CODE/mmaction2-main/demo/webcam_demo_spatiotemporal_det.py", line 786, in main stdet_predictor = StdetPredictor( File "D:/CODE/mmaction2-main/demo/webcam_demo_spatiotemporal_det.py", line 291, in init model = init_detector(config, checkpoint, device=device) File "D:\CODE\mmaction2-main\mmdetection-main\mmdet\apis\inference.py", line 102, in init_detector metainfo = DATASETS.build(test_dataset_cfg).metainfo File "D:\Anaconda3\envs\mmact2\lib\site-packages\mmengine\registry\registry.py", line 570, in build return self.build_func(cfg, *args, kwargs, registry=self) File "D:\Anaconda3\envs\mmact2\lib\site-packages\mmengine\registry\build_functions.py", line 121, in build_from_cfg obj = obj_cls(args) # type: ignore File "D:\CODE\mmaction2-main\mmaction\datasets\ava_dataset.py", line 158, in init self.proposals = load(self.proposal_file) File "D:\Anaconda3\envs\mmact2\lib\site-packages\mmengine\fileio\io.py", line 855, in load with BytesIO(file_backend.get(file)) as f: File "D:\Anaconda3\envs\mmact2\lib\site-packages\mmengine\fileio\backends\local_backend.py", line 33, in get with open(filepath, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'data/ava/annotations/ava_dense_proposals_val.FAIR.recall_93.9.pkl'

Additional information

ava

hrshovon commented 9 months ago

you need to download the proposals https://github.com/open-mmlab/mmaction2/blob/main/tools/data/ava/README.md follow step 5 from here

lsewcx commented 7 months ago

download https://download.openmmlab.com/mmaction/dataset/ava/ava_dense_proposals_val.FAIR.recall_93.9.pkl and Put it in the project root directory like I did image