open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
28.52k stars 9.29k forks source link

Color setting for bounding box #6980

Closed wliebtzy closed 2 years ago

wliebtzy commented 2 years ago

Hello maintainers, I have successfully reimplemented the Faster RCNN under mmdet. After inference, the bboxs in the result images show only the color orange. Since my custom dataset has 7 categories, I wanna ask if I can offer a set of colors(7) to render the bboxs according to the categories? I have checked the function "show_result_pyplot", but the color set is fixed.

Best regards!

RangiLyu commented 2 years ago

This feature is working in progress. Refer to #6716

wliebtzy commented 2 years ago

This feature is working in progress. Refer to #6716 Got it! Thank you for your work and rapid response!

wliebtzy commented 2 years ago

This feature is working in progress. Refer to #6716

Hello, I have tried following the suggestion you provided. All changed code has been modified. I don't use the demo but customizing a test.py which follows "/tools/test.py" in swin-transformer object detection. But now the result remains still only one color. Do you have some advice?

wliebtzy commented 2 years ago

Should I reinstall or recompile the mmdetection after modifying?

wliebtzy commented 2 years ago

Solved! Thanks!

TonojiKiobya commented 7 months ago

Can you share, how did you do it?

wang1528186571 commented 5 months ago

解决了!谢谢!

can share for us .