ika-rwth-aachen / Cam2BEV

TensorFlow Implementation for Computing a Semantically Segmented Bird's Eye View (BEV) Image Given the Images of Multiple Vehicle-Mounted Cameras.
MIT License
715 stars 116 forks source link

how i can get the camera_configs with my own data #7

Closed raozhongyu closed 3 years ago

raozhongyu commented 3 years ago

Thanks for your great work. I'd like to konw how i can get the camera_configs with my own data. My own data is collected by carla, Can you give me some suggestions. Thanks a lot

lreiher commented 3 years ago

Please familiarize yourself with the pinhole camera model and the intrinsic and extrinsic camera matrix. Google should give you plenty of resources.

I have not used Carla before, but based on the docs, you seem to configure the camera with this code:

camera = carla.sensor.Camera('MyCamera', PostProcessing='SemanticSegmentation')
camera.set(FOV=90.0)
camera.set_image_size(800, 600)
camera.set_position(x=0.30, y=0, z=1.30)
camera.set_rotation(pitch=0, yaw=0, roll=0)

XCam... in our configs is the camera position. yaw..., the rotation, is also found in our config. px/py are half the image size. Focal length fx/fy can be deduced from the FOV.

raozhongyu commented 3 years ago

Thanks for reply so fast. I will try it. Thanks a lot !

raozhongyu commented 3 years ago

I have another question about the OOM with vaildation, I can train without validate. Can you give me some suggestions?

lreiher commented 3 years ago

How much GPU memory do you have? Is the GPU fully utilized during training and validation? Have you tried with decreased batch size?

raozhongyu commented 3 years ago

I employ the 2080Ti with 11GB. The memory is almost fully utilized during the trainning and out of memory with validation. I have emplye the batch size with two. The out of memory also occued. Is there some way to split the process with training and validation?

lreiher commented 3 years ago

You can of course simply train without validation and later evaluate on a validation set. This will require some code changes on your side. Cannot really help with the OOM issue, is running fine for us.