open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5.2k stars 1.53k forks source link

nuImage seg problems #288

Closed Shaoqing26 closed 3 years ago

Shaoqing26 commented 3 years ago

Envs: pytorch:1.3.1 cuda:10.0.130 cudnn:7.6.5 mmdet:2.8.0 mmdet3d:0.9.0 mmcv:1.2.4 python:3.6.9

I have transfer nuImage data format to coco style with the code in the path tools/data_converter/nuimage_converter.py and got the json file. There has two problems when i run nuImage semantic segmantation code: 1.run test.py --config ../configs/nuimages/mask_rcnn_r50_fpn_1x_nuim.py --checkpoint../model_pth/mask_rcnn_r50_fpn_1x_nuim_20201008_195238-e99f5182.pth --out ../model_pth/result.pkl --show --eval segm

I got AttributeError: 'MaskRCNN' object has no attribute 'show_results' where from
mmdet3d/apis/test.py 32 :line if show: model.module.show_results(data, result, out_dir)

2. when i dont use show command: and i got
File "/home/ral/software/anaconda3/envs/public3d/lib/python3.6/site-packages/mmdet/datasets/coco.py", line 265, in _segm2json if isinstance(segms[i]['counts'], bytes): IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

i found that seg variable in mmdet/datasets/coco.py line239 is the list with format: [[array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]])], [], [], [], [], [], [], [array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]]), array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]])], [array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]]), array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]]), array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]]), array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]]), array([[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]])], []] and dont have any counts or others,just a list. 3. when i annotation the code if isinstance(segms[i]['counts'], bytes): I got the evaluation result like:

Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=1000 ] = 0.000 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=1000 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=300 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=1000 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.000

I wana to know where problem is? and how can i get the result like git picture in configs/nuimages/README.md? thanks!

Shaoqing26 commented 3 years ago

also when i pip install -v -e . to install mmdetection3d i see series warning as follow: reading manifest template 'MANIFEST.in' warning: no files found matching 'mmdet3d/ops//*.cpp' warning: no files found matching 'mmdet3d/ops/*/.cu' warning: no files found matching 'mmdet3d/ops//*.h' warning: no files found matching 'mmdet3d/ops/*/.cc' warning: no files found matching 'mmdet3d/VERSION' but install successed ,is ther any problem?

ZwwWayne commented 3 years ago

also when i pip install -v -e . to install mmdetection3d i see series warning as follow: reading manifest template 'MANIFEST.in' warning: no files found matching 'mmdet3d/ops/*/.cpp' warning: no files found matching 'mmdet3d/ops//_.cu' warning: no files found matching 'mmdet3d/ops//_.h' warning: no files found matching 'mmdet3d/ops/*/.cc' warning: no files found matching 'mmdet3d/VERSION' but install successed ,is ther any problem?

This is caused by the unclean MANIFEST.in. @xiliu8006 will fix that.

Shaoqing26 commented 3 years ago

also when i pip install -v -e . to install mmdetection3d i see series warning as follow: reading manifest template 'MANIFEST.in' warning: no files found matching 'mmdet3d/ops/*/.cpp' warning: no files found matching 'mmdet3d/ops//_.cu' warning: no files found matching 'mmdet3d/ops//_.h' warning: no files found matching 'mmdet3d/ops/*/.cc' warning: no files found matching 'mmdet3d/VERSION' but install successed ,is ther any problem?

This is caused by the unclean MANIFEST.in. @xiliu8006 will fix that.

OK,Thanks,i thinks there may has some problems that i mentioned above,Is there has any plan to fix it and prove traning code of nuImage dataset,I found that there just has inference code in project. and only support singe image,BTW,how to evaluate the accurenccy or or other indicator,It seems that have no code in offercier code for evaluation,which confidence number should i set for each class,I wana to transfer mask img (1600900) with inference code to cityscape scale(20481024) and use use cityscape eval code to do evaluation,is this ok? appreciate your kindly reply,Thanks.

xiliu8006 commented 3 years ago

I got AttributeError: 'MaskRCNN' object has no attribute 'show_results' where from mmdet3d/apis/test.py 32 :line if show: model.module.show_results(data, result, out_dir)

It is a bug, I am fixing it.

and how can i get the result like git picture in configs/nuimages/README.md? thanks!

If the bug is fixed, you will get the result images in the --out directory.

Shaoqing26 commented 3 years ago

I got AttributeError: 'MaskRCNN' object has no attribute 'show_results' where from mmdet3d/apis/test.py 32 :line if show: model.module.show_results(data, result, out_dir)

It is a bug, I am fixing it.

and how can i get the result like git picture in configs/nuimages/README.md? thanks!

If the bug is fixed, you will get the result images in the --out directory.

OK,Thanks,is there any plan to prove training and eval code?

Tai-Wang commented 3 years ago

Fixed via #408 . About how to train and evaluate, please refer to #402 .

annawbr commented 3 years ago

2. when i dont use show command: and i got File "/home/ral/software/anaconda3/envs/public3d/lib/python3.6/site-packages/mmdet/datasets/coco.py", line 265, in _segm2json if isinstance(segms[i]['counts'], bytes): IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

I have the same problem. Can somebody please help?