Leeiieeo / AG-Pose

CVPR2024: Instance-Adaptive and Geometric-Aware Keypoint Learning for Category-Level 6D Object Pose Estimation
MIT License
45 stars 2 forks source link

测试数据集缺少图像 #11

Open zxl55552 opened 3 months ago

zxl55552 commented 3 months ago

Test [717/19220][5]: : 4%|████▉ | 717/19220 [00:27<10:34, 29.18it/s]warning: No data Test [846/19220][1]: : 4%|█████▊ | 845/19220 [00:31<10:24, 29.41it/s]warning: No data Test [922/19220][3]: : 5%|██████▎ | 921/19220 [00:34<09:58, 30.56it/s]libpng error: IDAT: CRC error Test [938/19220][3]: : 5%|██████▍ | 938/19220 [00:35<11:22, 26.80it/s] Traceback (most recent call last): File "/root/autodl-tmp/AG-Pose-main/test.py", line 114, in test_func(model, dataloder, save_path) File "/root/autodl-tmp/AG-Pose-main/utils/solver.py", line 225, in test_func for i, data in enumerate(dataloder): File "/root/miniconda3/envs/ag/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 681, in next data = self._next_data() File "/root/miniconda3/envs/ag/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1356, in _next_data return self._process_data(data) File "/root/miniconda3/envs/ag/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1402, in _process_data data.reraise() File "/root/miniconda3/envs/ag/lib/python3.9/site-packages/torch/_utils.py", line 461, in reraise raise exception TypeError: Caught TypeError in DataLoader worker process 2. Original Traceback (most recent call last): File "/root/miniconda3/envs/ag/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/root/miniconda3/envs/ag/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/miniconda3/envs/ag/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/autodl-tmp/AG-Pose-main/provider/nocs_dataset.py", line 210, in getitem rgb = cv2.imread(image_path + '_color.png')[:, :, :3] TypeError: 'NoneType' object is not subscriptable 你好请问遇到过这种问题吗?是不是数据集又问题呀,该如何解决呀,我看测试图像中有的没有_color.png后缀的图像

Leeiieeo commented 3 months ago

我测试的时候也遇到过类似的问题,原因可能是测试数据集存在错误。有问题的测试数据很少(<10),我直接跳过了这些图像。应该不会对精度产生什么影响

zxl55552 commented 3 months ago

谢谢您的回复!请问是如何跳过的呀,需要在数据集中一个一个找吗?还是在代码中修改呀

Leeiieeo commented 3 months ago

我只遇到过depth map数据错误的情况,我是通过12跳过的。在我本地的数据集中,rgb图像出问题确实没有遇见。我觉得你也可以通过if判断读取结果来跳过那些Nonetype。并且如果数量不多的话应该不会影响最后的结果,如果频繁出现那可能考虑重新下载数据集。

zxl55552 commented 3 months ago

好的谢谢你

zxl55552 commented 3 months ago
    #rgb = cv2.imread(image_path + '_color.png')[:, :, :3]#原始代码
    rgb = cv2.imread(image_path + '_color.png')
    if rgb is None:
        # random choose
        index = np.random.randint(self.__len__())
        return self.__getitem__(index)
    rgb = rgb[:, :, :3]
    rgb = rgb[:, :, ::-1] #480*640*3    你好,我的代码改成这样你看正确吗,现在是能跑起来但是出现很多warning: No data,大概有三十多个,这是不是就是数据集的原因啊no. of test images: 19220

Test [717/19220][5]: : 4%|████▏ | 716/19220 [00:29<11:25, 27.01it/s]warning: No data Test [846/19220][1]: : 4%|████▉ | 846/19220 [00:34<11:29, 26.64it/s]warning: No data Test [922/19220][3]: : 5%|█████▎ | 921/19220 [00:36<10:55, 27.91it/s]libpng error: IDAT: CRC error Test [1057/19220][1]: : 5%|██████ | 1057/19220 [00:41<10:19, 29.32it/s]warning: No data Test [3916/19220][3]: : 20%|██████████████████████▍ | 3916/19220 [02:23<09:52, 25.85it/s]warning: No data Test [4233/19220][3]: : 22%|████████████████████████▏ | 4233/19220 [02:34<09:11, 27.19it/s]warning: No data Test [4593/19220][2]: : 24%|██████████████████████████▎ | 4592/19220 [02:52<08:21, 29.14it/s]warning: No data Test [4770/19220][1]: : 25%|███████████████████████████▎ | 4769/19220 [02:58<09:00, 26.73it/s]warning: No data Test [6894/19220][3]: : 36%|███████████████████████████████████████▍ | 6893/19220 [04:14<07:22, 27.89it/s]warning: No data Test [7558/19220][3]: : 39%|███████████████████████████████████████████▎ | 7557/19220 [04:38<06:51, 28.34it/s]warning: No data Test [8002/19220][1]: : 42%|█████████████████████████████████████████████▊ | 8001/19220 [04:54<06:28, 28.89it/s]warning: No data Test [8818/19220][2]: : 46%|██████████████████████████████████████████████████▍ | 8817/19220 [05:23<05:59, 28.92it/s]warning: No data Test [9051/19220][6]: : 47%|███████████████████████████████████████████████████▊ | 9050/19220 [05:31<05:58, 28.33it/s]warning: No data Test [9310/19220][3]: : 48%|█████████████████████████████████████████████████████▎ | 9309/19220 [05:40<05:40, 29.07it/s][ WARN:0@344.067] global loadsave.cpp:241 findDecoder imread_('./data/camera/val/02127/0002color.png'): can't open/read file: check file path/integrity Test [9319/19220][5]: : 48%|█████████████████████████████████████████████████████▎ | 9319/19220 [05:41<05:49, 28.30it/s]warning: No data Test [9552/19220][3]: : 50%|██████████████████████████████████████████████████████▋ | 9551/19220 [05:49<05:34, 28.87it/s]warning: No data Test [9566/19220][3]: : 50%|██████████████████████████████████████████████████████▋ | 9566/19220 [05:49<05:35, 28.80it/s]libpng error: IDAT: CRC error Test [9867/19220][4]: : 51%|████████████████████████████████████████████████████████▍ | 9867/19220 [06:00<05:19, 29.26it/s]warning: No data Test [11364/19220][2]: : 59%|███████████████████████████████████████████████████████████████▊ | 11364/19220 [06:53<04:43, 27.72it/s]warning: No data Test [11712/19220][3]: : 61%|█████████████████████████████████████████████████████████████████▊ | 11711/19220 [07:06<04:37, 27.03it/s]warning: No data Test [11905/19220][2]: : 62%|██████████████████████████████████████████████████████████████████▉ | 11904/19220 [07:13<04:22, 27.86it/s]warning: No data Test [12058/19220][5]: : 63%|███████████████████████████████████████████████████████████████████▊ | 12057/19220 [07:18<04:29, 26.53it/s]warning: No data Test [12112/19220][2]: : 63%|████████████████████████████████████████████████████████████████████ | 12112/19220 [07:20<04:15, 27.86it/s]warning: No data Test [12491/19220][3]: : 65%|██████████████████████████████████████████████████████████████████████▏ | 12491/19220 [07:34<04:02, 27.70it/s]warning: No data Test [12711/19220][6]: : 66%|███████████████████████████████████████████████████████████████████████▍ | 12710/19220 [07:42<03:37, 29.93it/s]warning: No data Test [13208/19220][2]: : 69%|██████████████████████████████████████████████████████████████████████████▏ | 13207/19220 [08:00<03:47, 26.47it/s]warning: No data Test [13356/19220][3]: : 69%|███████████████████████████████████████████████████████████████████████████ | 13355/19220 [08:05<03:26, 28.35it/s]warning: No data Test [13572/19220][1]: : 71%|████████████████████████████████████████████████████████████████████████████▎ | 13571/19220 [08:13<03:23, 27.73it/s]warning: No data Test [14821/19220][2]: : 77%|███████████████████████████████████████████████████████████████████████████████████▎ | 14820/19220 [08:57<02:48, 26.09it/s][ WARN:0@541.083] global loadsave.cpp:241 findDecoder imread('./data/camera/val/01558/0007color.png'): can't open/read file: check file path/integrity Test [15118/19220][4]: : 79%|████████████████████████████████████████████████████████████████████████████████████▉ | 15117/19220 [09:08<02:26, 27.91it/s]warning: No data Test [15627/19220][4]: : 81%|███████████████████████████████████████████████████████████████████████████████████████▊ | 15626/19220 [09:26<02:04, 28.78it/s]warning: No data Test [15956/19220][3]: : 83%|█████████████████████████████████████████████████████████████████████████████████████████▋ | 15955/19220 [09:37<01:56, 28.15it/s][ WARN:0@581.281] global loadsave.cpp:241 findDecoder imread('./data/camera/val/00731/0004_color.png'): can't open/read file: check file path/integrity Test [19104/19220][3]: : 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▎| 19104/19220 [11:31<00:04, 28.84it/s]warning: No data Test [19220/19220][3]: : 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19220/19220 [11:35<00:00, 27.64it/s]

Leeiieeo commented 3 months ago

你的测试结果和paper中的差别大吗

zxl55552 commented 3 months ago

差别有点大,特别是cm,deg评价指标上,我是下载的主页的那个链接的数据集,这个 warning: No data就是深度图缺失吧

zxl55552 commented 3 months ago

抱歉这么晚打扰你,请问可以上传您的本地的camera数据集的测试集和深度图吗,谢谢了

Leeiieeo commented 3 months ago

方便展示一下具体的结果吗

zxl55552 commented 3 months ago

可以,不过现在身边么电脑,等明天我把结果回复给你,多谢

---- 回复的原邮件 ---- | 发件人 | Xiao @.> | | 发送日期 | 2024年06月20日 22:00 | | 收件人 | Leeiieeo/AG-Pose @.> | | 抄送人 | zxl55552 @.>, Author @.> | | 主题 | Re: [Leeiieeo/AG-Pose] 测试数据集缺少图像 (Issue #11) |

方便展示一下具体的结果吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

zxl55552 commented 3 months ago

2024-06-20 21:05:09,951 - **** Start Logging **** 2024-06-20 21:20:14,274 - 3D IoU at 25: 92.0 2024-06-20 21:20:14,274 - 3D IoU at 50: 91.6 2024-06-20 21:20:14,274 - 3D IoU at 75: 89.3 2024-06-20 21:20:14,274 - 5 degree, 2cm: 72.1 2024-06-20 21:20:14,274 - 5 degree, 5cm: 77.6 2024-06-20 21:20:14,274 - 10 degree, 2cm: 83.5 2024-06-20 21:20:14,274 - 10 degree, 5cm: 90.5 2024-06-20 21:20:14,274 - 3D IoU at 25 per category:[85.60749454 97.78416942 91.56736618 87.69484011 93.89422445 95.38205451 91.9883582 ] 2024-06-20 21:20:14,275 - 3D IoU at 50 per category:[85.50597165 97.75201024 90.81966505 87.62178016 92.84460776 95.21701491 91.62684163] 2024-06-20 21:20:14,275 - 3D IoU at 75 per category:[82.76276715 97.71483455 87.62402413 87.54323006 85.29032233 94.65878347 89.26566028] 2024-06-20 21:20:14,275 - 5 degree, 2cm per category:[82.79002106 96.77858066 33.84485665 96.14320951 69.8078754 53.07121548 72.07262646] 2024-06-20 21:20:14,275 - 5 degree, 5cm per category:[94.94071513 98.32170696 35.82598649 96.6616882 86.67550732 53.29056141 77.61936092] 2024-06-20 21:20:14,275 - 10 degree, 2cm per category:[84.86287738 98.12838758 62.02052287 98.82648311 74.92291076 82.04043361 83.46693589] 2024-06-20 21:20:14,275 - 10 degree, 5cm per category:[97.59651269 99.71931201 68.77684477 99.35484531 94.93948905 82.3727489 90.45995879] 你好,这是测试camera数据集的具体结果,测试real数据集的话是正常的,也不会出现无数据的问题,就是camera数据集总是出现warning: No data问题,是不是我的camera数据集下载有问题啊

Leeiieeo commented 3 months ago

如果是对同一个实验先后测试REAL和CAMERA,需要在测试完前一个之后手动删除前一个产生的result.pkl,否则后测试的会受到影响。

具体而言,同一个实验,测试完REAL之后,手动删除//log//下的eval_epoch30目录下所有结果,再进行下一个CAMERA的测试

希望可以解决你的问题

zxl55552 commented 3 months ago

谢谢你的帮助,通过你的方法已经解决了这个问题,太感谢了

---- 回复的原邮件 ---- | 发件人 | Xiao @.> | | 发送日期 | 2024年06月21日 10:07 | | 收件人 | Leeiieeo/AG-Pose @.> | | 抄送人 | zxl55552 @.>, Author @.> | | 主题 | Re: [Leeiieeo/AG-Pose] 测试数据集缺少图像 (Issue #11) |

如果是对同一个实验先后测试REAL和CAMERA,需要在测试完前一个之后手动删除前一个产生的result.pkl,否则后测试的会受到影响。

具体而言,同一个实验,测试完REAL之后,手动删除//log//下的eval_epoch30目录下所有结果,再进行下一个CAMERA的测试

希望可以解决你的问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>