项目作者: sk-aravind

项目描述 :
A two stage multi-modal loss model along with rigid body transformations to regress 3D bounding boxes
高级语言: Python
项目地址: git://github.com/sk-aravind/3D-Bounding-Boxes-From-Monocular-Images.git
创建时间: 2019-04-19T09:00:47Z
项目社区:https://github.com/sk-aravind/3D-Bounding-Boxes-From-Monocular-Images

开源协议:MIT License

下载


Predicting 3D Bounding Boxes for Non-temporal Monocular Images

3D Bounding Box Prediction From Monocular Image

Utilising a two stage multi-modal loss model along with rigid body transformations to regress 3D bounding boxes, orientations and coordinates from monocular images

File Structure

  1. .
  2. ├── Kitti # Kitti Data Folder
  3. ├── camera_cal # Store global calibration matrix
  4. ├── results # Training and Validation results
  5. ├── training # Location of training data
  6. ├── image_2 # Downloaded from KITTI's website
  7. ├── calib # Downloaded from KITTI's website
  8. └── label_2 # Downloaded from KITTI's website
  9. └── validation # Location for validation/infference images
  10. ├── image_2 # Images you want to perform inferrence/validation on
  11. ├── calib # Corresponding labels
  12. └── label_2 # Corresponding labels
  13. ├── lib # python functions and scripts
  14. ├── weights # store trained weights, yolo weights
  15. ├── yolo # yolo network scripts
  16. ├── Eval.py # script to evaluate quantitatively and qualitatively
  17. ├── Train.py # training script
  18. ├── Run.py # run the model and see the visual examples
  19. └── Run_with_2D.py # run the 2 stage model with yolonet and see the visual examples
  1. python run_with_2D.py

This script utilises the a yolo network to detect pedestrians and cars
from and images. The 2D detections are crop out and fed it into the model so that
it can predict a 3D bounding box for each of the 2D detections

The script will plot the results of the 3D bounding box onto the image and display it
using cv2.show, press the space bar in order to move on to the next image

Images to be evaluated should be placed in Kitti/validation/image_2

FLAGS:
—val-img-path
Please specify the path to the images you wish to evaluate.
Path default is Kitti/validation/image_2/

—calb-path
Please specify the path containing camera calibration obtained from KITTI.
Path default is Kitti/camera_cal/

—show-2D
Shows yolonet’s 2D BoundingBox detections of in a seperate image alongside the 3D regressed boxes

  1. python run.py

This script utilises the ground truth label’s 2D bounding box to
crop out the the points of interest and feed it into the model so that
it can predict a 3D bounding box for each of the 2D detections

The script will plot the results of the 3D bounding box onto the image
and display them alongside the groundtruth image and it’s 3D bounding box.
This is to help with qualitative assesment.

Images to be evaluated should be placed in Kitti/validation/image_2

FLAGS:

—hide-imgs
Hides Display of ground truth and bounding box

  1. python Train.py --exp-no 5

This script trains the model using cropped images of cars and pedestrians
obtained from the labels. The model produces 3 outputs the orientation,dimension
and it’s confidence of the 3D bounding box based on the 2D image.

The script requires you to specifiy an experiment no, so that it can create all the relevant
folders to track metrics and weights in an ordered fashion.

For each epoch the weights will be saved to the weights folder with the exp_no as the subfolder

For each epoch the training metrics for the orientation loss,dimension loss, theta loss,
overall interation loss, overall epoch loss is saved to help with debugging and monitor the convergence

ARGUMENTS:

—epochs
type = int
default = 2
No of training epochs

—exp-no
type = int
Experiment No. so we can save all the metrics and weights related to this experiment

Eg. python Train.py —exp-no 8

To download the YOLO Weights

Download the weights:

  1. cd weights/
  2. ./get_weights.sh