carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.36k stars 3.69k forks source link

a simple way to generate 2d bounding box? #872

Closed 1453042287 closed 5 years ago

1453042287 commented 6 years ago
    there is a method to generate an image containing CARLA semantic segmentation labels, why can't we utilize the similar way to generate the 2d bounding box?
    any suggestion? thanks a lot!
analog-cbarber commented 6 years ago

Doesn't seem that would work very well if there are overlapping objects with same segmentation. It would work better if we had an image with per-pixel agent-id labels.

It really is better to just project the 3D OBB onto the camera perspective and cull boxes that are outside the camera frustrum or behind the reported depth (requires depth images of course).

1453042287 commented 6 years ago

Thank you for the suggestions @analog-cbarber but actually, what i mean is not to draw the bounding box from the segmentation image, i wonder why can't we just utilize the method that generate the segmentation camera image to directly generate the 2d box? BTW, can you briefly describe the process about how the segmentation labels is generated or some hints to the code? thanks a lot!

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

giladdiv commented 5 years ago

@1453042287 Have you managed to draw 2D boxes?

1453042287 commented 5 years ago

@giladdiv right, it's done, and i'm working on the instance segmentation for now : )

1453042287 commented 5 years ago

@giladdiv BTW, #772 can give you the simple way to get the bbox, i depended on this issue heavily, good luck!

giladdiv commented 5 years ago

@1453042287 Thanks, but I did not understand when def _on_render(self) is being called and how can I change the camera.listen function to draw the bbox on the images?

1453042287 commented 5 years ago

the _on_render(self) function is defined in the manual_control.py, but you can ignore that and just utilize the variable and function mentioned in the #772 , it's same to use this method in other .py file, like client_example.py and so on

giladdiv commented 5 years ago

@1453042287 Which version are you running? I tried 0.92 and 0.84 and it seems that the notations from the code do not exists like xxxx.transform xxxx.matrix

1453042287 commented 5 years ago

@giladdiv i use the 0.82(stable) and the 0.84(have bike), xxx.transform is the measurements which mentioned in the carla's instructions, and U can find the xxx.matrix in the carla_0.8.4/PythonClient/carla/transform.py

marcgpuig commented 5 years ago

Hi @1453042287 glad to see you are making it work! Maybe the issue #76 can give you some clue about the instance semantic segmentation detector. Good luck!

1453042287 commented 5 years ago

@marcgpuig thanks

geekhut commented 5 years ago

@1453042287 Hi could you please share the code for 2D bounding box? Thanks.

1453042287 commented 5 years ago

i'm now working on the point cloud and the code for 2d bbox is not used anymore for a while and the version changes a lot , just look at the #772 and you will find a simple way to draw the 2d bbox :)

stevelaclasse commented 4 years ago

check this issue

https://github.com/carla-simulator/carla/issues/2325