- Aim
- About the Project
- Getting Started
- Prerequisites and Installations
- Methodologies Proposed
- Results
- License
To improve depth estimation and disparity map generation using OAK-D Pro camera. To justify a method to get highly accurate depth map by utilizing traditional knowledge and modern deep learning techniques.
Depth estimation is traditionally done using a pair of cameras called a stereo pair. Depth Estimation algorithms using Neural Networks have made enormous strides recently. Some algorithms estimate depth using a single image (monocular depth), others use neural networks to improve the depth estimated using a stereo pair, and some improve the depth estimation for RGBD cameras.
Original Image | Disparity Map |
---|---|
- Install Depthai and many other important librariesutilized in this project by running following command :
pip install -r requirements.txt
- You must have an OAK-D camera
- Required weights and models for code can be installed from scripts
While going through various research paper we found that performing pre processing on stereo left and stereo right image and then implementing stereo rectification as well as triangulation method increases depth perception of camera manifolds. As well as reduce its noise.Preprocessing on images with certain touch on it with inbuilt OAK D post processing filters has improved its depth a lot. For Example ,
Stereo Map Generated By OAK-D | Stereo Map After Pre+Post Processing |
---|---|
- Download prerequisite files from scripts and then perform following steps.
- Run following command on terminal
python3 Processing.py
MiDAS is a pretrained model which improves Monocular Depth Estimation (MDE) of monocular RGB video. It generates a state of the art image. The success of monocular depth estimation relies on large and diverse training sets. Due to the challenges associated with acquiring dense ground-truth depth across different environments at scale, a number of datasets with distinct characteristics and biases have emerged. MiDaS was trained on 10 datasets (ReDWeb, DIML, Movies, MegaDepth, WSVD, TartanAir, HRWSI, ApolloScape, BlendedMVS, IRS) with multi-objective optimization.
Normal RGB Image | MiDAS MDE |
---|---|
- Download prerequisite files from the scripts and perform following step.
- Run following command on terminal
python3 Midas.py
In this approach we fuse disparity map generated by OAK-D using stereo cameras and disparity map generated using MiDAS model (MDE) on rgb video. This method aims to combine excellent features of Stereo as well as Monocular Depth Estimations and reduce noise generated by one disparity map by superimposing quality of other disparity map. For further information kindly check folder Fusion
Original Scene | Steeo Disparity By OAK-D | MiDAS Disparity | Fused Disparity Map |
---|---|---|---|
- Download prerequisite files from scripts and then perform following steps.
- Run following command on terminal
python3 main.py
Original Scene | OAK-D Stereo | MiDAS MDE | Fusion |
---|---|---|---|
Following is the final result of our methodology with its real time analysis in Frames Per Second (FPS)
Methods | FPS |
---|---|
Pre+ post processing on Stereo | 25 |
Only MiDAS | 18 |
Fusion Using CMAP From OAK - D | 15 |
Fusion Using canny edge on RGB | 13 |
MIT License is added to project.