Owen-Liuyuxuan / visualDet3D

Official Repo for Ground-aware Monocular 3D Object Detection for Autonomous Driving / YOLOStereo3D: A Step Back to 2D for Efficient Stereo 3D Detection
https://owen-liuyuxuan.github.io/papers_reading_sharing.github.io/3dDetection/GroundAwareConvultion/
Apache License 2.0
362 stars 77 forks source link

Can I use my own data on your model? #16

Closed sjg02122 closed 3 years ago

sjg02122 commented 3 years ago

I created synthetic data using by Carla simulator(Unreal Engine based). And I transformed the data to Kitti data format.

Then, I faced the problem that

./launchers/det_precompute.sh config/mono3d.py train

Error : Precomputation for the training/validation split start reading training data Traceback (most recent call last): File "scripts/imdb_precompute_3d.py", line 213, in Fire(main) File "/home/cv1/miniconda3/envs/yolostereo/lib/python3.7/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/cv1/miniconda3/envs/yolostereo/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire target=component.name) File "/home/cv1/miniconda3/envs/yolostereo/lib/python3.7/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "scripts/imdb_precompute_3d.py", line 200, in main read_one_split(cfg, train_names, data_root_dir, output_dict, 'training', time_display_inter) File "scripts/imdb_precompute_3d.py", line 103, in read_one_split image, P2, label = preprocess(original_image, p2=deepcopy(calib.P2), labels=deepcopy(data_frame.label)) File "/home/cv1/visualDet3D/visualDet3D/data/pipeline/augmentation_builder.py", line 49, in call left_image, right_image, p2, p3, labels, image_gt, lidar = t(left_image, right_image, p2, p3, labels, image_gt, lidar) File "/home/cv1/visualDet3D/visualDet3D/data/pipeline/stereo_augmentator.py", line 50, in call left_image -= np.tile(self.mean, int(left_image.shape[2]/self.mean.shape[0])) ValueError: operands could not be broadcast together with shapes (288,1280,4) (3,) (288,1280,4)

I think that problem is my data format. I guessed the Expected Data format is (n,m,3) but my data format is (n,m,4). Is my guess right?

Thanks your kind.

Owen-Liuyuxuan commented 3 years ago

You need to be sure that the images are standard three-channel RGB images.

In this repo, we utilize PIL.Image to open the image like here.

You can try that code in a script first to make sure the data are correct.

sjg02122 commented 3 years ago

Oh, Thanks. I fixed that problem.

I close this issue

Thanks your kind and work.