DLR-RM / BlenderProc

A procedural Blender pipeline for photorealistic training image generation
GNU General Public License v3.0
2.65k stars 438 forks source link

Need long distance up to 100 or 150 meters for training dataset generation using BlenderProc for long distance object detection #1117

Open Misbah-Said opened 3 weeks ago

Misbah-Said commented 3 weeks ago

Describe the issue

I have a 3D model of a vehicle, and I want to train data using it. I need object detection for long distances, like 100 meters or 150 meters. How can I set such a long distance to get the depth of the object from far away, so if the training will be good my model can detect the object properly from long range distance? one more problem how would i know about the distance its 100 meter 0r 150 meters.

Minimal code example

No response

Files required to run the code

No response

Expected behavior

Figure_1

BlenderProc version

2.31

cornerfarmer commented 3 weeks ago

Hey @Misbah-Said,

I dont understand your question. Depth images should work also with higher distances. Please elaborate what the current output is you get and what your expected output is.

Misbah-Said commented 3 weeks ago

hello..... I want to know how to determine the distance of an object from the camera. I have set up the camera, but I need the distance in meters to know how far the vehicle is from the camera. Can you tell me how to check the distance? i want to check the distance of object from camera in meters or how we can set that distance? a4 please see this picture and tell me how would I know what is the distance from camera to vehicle ?

Misbah-Said commented 2 weeks ago

how can we add names for the different objects using coco annotation. image

and one more problem is that why its not creating bounding box around the object it just create one bbox as whole image

cornerfarmer commented 2 weeks ago

You can set the name of an object via obj.set_name("my_name").

You can calculate the distance between the camera and an object via np.linalg.norm(bproc.camera.get_camera_pose()[:3, 3] - obj.get_location())

Regarding the bounding box: Please provide the code you are using. Are you setting category_id correctly?

Misbah-Said commented 2 weeks ago

You can set the name of an object via obj.set_name("my_name").

You can calculate the distance between the camera and an object via np.linalg.norm(bproc.camera.get_camera_pose()[:3, 3] - obj.get_location())

Regarding the bounding box: Please provide the code you are using. Are you setting category_id correctly?

Thank you for your response...….but I have multiple objects like (human , cars , deer, bus etc. then how to set that names) and for distance I will try now and tell you further. here is the code for bounding box see and correct me. image and

image

Misbah-Said commented 2 weeks ago

Can you please tell me what information does this distance map is delivering that I have circled? image

Misbah-Said commented 2 weeks ago

You can set the name of an object via obj.set_name("my_name").

You can calculate the distance between the camera and an object via np.linalg.norm(bproc.camera.get_camera_pose()[:3, 3] - obj.get_location())

Regarding the bounding box: Please provide the code you are using. Are you setting category_id correctly?

I executed this code, and in the output, it calculated this circled distance. Can you please tell me how it calculate this distance. Can you tell me how to set a distance of 100 meters between the camera and the object? Actually, the camera will be static in my case, and I need to detect objects from a long distance. So how can I set this distance from the camera to the object in meters? distance must be in meters.

image

output ..... image

Misbah-Said commented 2 weeks ago

@cornerfarmer kindly reply me I'm waiting for your response to continue my further task. and do let me know, how to set distance in script from camera to object. if I want to set distance 100 meter, I just want my object should be visible 100 meter away from camera.

cornerfarmer commented 2 weeks ago

Please take a look at the tutorial and examples: https://github.com/DLR-RM/BlenderProc/blob/main/docs/tutorials/camera.md https://github.com/DLR-RM/BlenderProc/blob/3a7b07813fc36156ea18548d294fb1710098d42a/examples/datasets/front_3d_object_sampling/main.py#L117

Misbah-Said commented 2 weeks ago

You can set the name of an object via obj.set_name("my_name"). You can calculate the distance between the camera and an object via np.linalg.norm(bproc.camera.get_camera_pose()[:3, 3] - obj.get_location()) Regarding the bounding box: Please provide the code you are using. Are you setting category_id correctly?

Thank you for your response...….but I have multiple objects like (human , cars , deer, bus etc. then how to set that names) and for distance I will try now and tell you further. here is the code for bounding box see and correct me. image and

image

thank you. I will try.... and what about segmentation mask AND annotation? why it didn't make bounding box around the box and take whole area as a bounding box??