Python program for real-time object detection with monocular depth estimation using conditional GANs (Isola et al., 2017).
- PyTorch
- OpenCV
- Nvidia GPU
Pix2Pix model is trained so as to learn the translation between an RGB image and its stereo depth estimate. A modified version of this program is currently being used as a part of state estimation in a driverless car currently in development by DJSRacing.
To get started, run - pip install -r requirements.txt
to install the required dependencies.
This is assuming that Ubuntu 18.04 LTS is installed on your computer with the required libraries for x264, DIVX, etc; if you are using any other OS, make sure you that are using the appropriate codec for video encoding.
Arguments
The following arguments are required before running -
Argument | Type | Description |
---|---|---|
camera_index | integer | Index number of the camera that you want to use (web-cam is usually 0). |
save_path | text | Save path relative to the current working directory. |
duration | integer | Recording duration in seconds. |
fps | integer | Frames per second of the recorded video |
For example,
python3 objstr.py 0 "" 10 30
This saves the video in the current working directory of length 10 seconds at 30 FPS.
- The current release is experimental and a lot of bug fixes and features are to be released in the future.