-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
执行测试文件报错,keyerror:‘img_name’ #99
Comments
遇到了同样的问题,请问解决了吗 |
请问问题解决了嘛 |
在pan_ic15.py中的‘prepare_test_data’方法(第441行之后)中添加 |
您好,能具体说一下这个文件在哪里吗?没找到 |
I also encountered this issue during the testing of ctw1500, and the reason for the problem is that there is indeed no 'imgname' key in the img_metas dictionary. This may be because the image name was not correctly set or passed during the data loading or processing phase. if osp.isfile(result_path): if result_path.endswith('.zip'): if not osp.exists(result_path): def write_result(self, img_metas, outputs): if 'IC15' in self.data_type: with_rec = hasattr(cfg.model, 'recognition_head') if cfg.vis: rf = ResultFormat(cfg.data.test.type, cfg.test_cfg.result_path) if cfg.report_speed: print('Start testing %d images' % len(test_loader)) #Print img_metas to see what's inside prepare inputdata['imgs'] = data['imgs'].cuda() forwardwith torch.no_grad(): if cfg.report_speed: post process of recognitionif with_rec: save resultrf.write_result(data['img_metas'], outputs) visualizeif cfg.vis: |
Thank you for your solution! |
请问怎么解决啊谢谢
The text was updated successfully, but these errors were encountered: