manydepth
manydepth copied to clipboard
Pip module
Having a pip module of manydepth is useful for people working on projects to be able to quickly install and run. I have implemented the installation flow along with a class as a wrapper for manydepth.
Installation and Usage
Have added instructions to use the module in the README.md
, in summary
# Installation
pip install git+https://github.com/AdityaNG/manydepth@pip-module
# Running
from manydepth import manydepth
md = manydepth()
# Load in a frame along with previous frame
depth = md.eval(frame, prev_frame)
Class Features
The class manydepth allows users to
- Choose the pre-trained model name
- Downloads and caches model
- Enable / Disable CUDA usage
- Pass numpy array as input image
- returns numpy array as output
Webcam Demo
Added a demo to use the webcam and output the depthmap for the video
python -m manydepth
Caching
Caching of the models has been moved to ~/.manydepth_models/
to simplify downloading and storing of models into one common directory for the user as opposed to the current-working-directory + models/
path. This was done my writing to a global variable manydepth_models_path
in the utils
I'd love to see this approved, because this is great work.