|
1 maand geleden | |
---|---|---|
.. | ||
Applications-with-Depth | 1 maand geleden | |
readme_images | 1 maand geleden | |
README.md | 1 maand geleden | |
depthpro-app.py | 1 maand geleden |
This folder contains the Jupyter Notebooks and Scripts for the LearnOpenCV article - Apple Depth Pro: Sharp Monocular Metric Depth.
!git clone https://github.com/apple/ml-depth-pro.git
cd ml-depth-pro
#setup
!pip install -e .
You will need to download the pre-trained checkpoint using the following bash command which will place the model under ml-depth-pro/checkpoints/depth-pro.pt
folder.
Download checkpoints:
source get_pretrained_models.sh
Image Inference – Usage
!depth-pro-run -i image.jpg -o output_dir
The input can be an image or a directory containing multiple images, the output_dir
will store the resulting inverse depth maps.
We have modified the ml-depth-pro/src/depth_pro/cli/run.py
to save raw depth and surface normal and is named as depthpro-app.py
To run,
python depthpro-app.py
To visualize metric depth per each pixel with a interactive OpenCV window, run
python metric-depth-visualize.py
parallax-effect.py
depth_of_field.py
depth_blur.py
depthToPointCloud.ipynb
You can directly download the code files from the below link.
Want to become an expert in AI? AI Courses by OpenCV is a great place to start.