skhadem / 3D-BoundingBox

PyTorch implementation for 3D Bounding Box Estimation Using Deep Learning and Geometry
MIT License
435 stars 96 forks source link

3D Bbox plotting and original image crop issue #18

Open JianliWei1995 opened 3 years ago

JianliWei1995 commented 3 years ago

Once a 3D Boundingbox is plotted, it is on the original image (names 'img') in your code. However, next cropped image would be cropped from the previous 'img' with last one or several 3D boundingbox. (i.e. Cropped images with partial 3D boundingbox plots are fed into model for training or testing. So I change tht code by plot_img = np.copy(truth_img) and then plot 3D boundingbox on plot_img rather than 'img'

nikola310 commented 3 years ago

Hi @JianliWei1995 could you please better explain what did you do? Or perhaps share which lines you changed?

JianliWei1995 commented 3 years ago

Hi @JianliWei1995 could you please better explain what did you do? Or perhaps share which lines you changed?

3D bounding box detection process is that you crop partial of the image, regress 3D box and plot it on the input image. If you detected multiple objects in a single input image, you need to repeat above steps within a for loop. However, once you plot on the original image, the next time you crop another object, it may or may not include partial 3D bounding box plot. Hence my way is to plot those 3D bbox in a copied image named plot_img. Every time you crop object should be on the original image. So that your plotting 3D bbox will not affect your next time cropping object and regressing it 3D bbox. Breifly speaking, the image that cropped and plotted are the same by seperated.