{"id":15027225,"url":"https://github.com/ialhashim/densedepth","last_synced_at":"2025-05-15T19:08:32.352Z","repository":{"id":37978702,"uuid":"163404737","full_name":"ialhashim/DenseDepth","owner":"ialhashim","description":"High Quality Monocular Depth Estimation via Transfer Learning","archived":false,"fork":false,"pushed_at":"2022-12-07T05:16:56.000Z","size":12440,"stargazers_count":1600,"open_issues_count":23,"forks_count":352,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-15T19:07:52.308Z","etag":null,"topics":["deep-learning","deep-neural-networks","depth-estimation","encoder-decoder-model","keras-tensorflow","python","pytorch","transfer-learning"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1812.11941","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ialhashim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-28T11:50:52.000Z","updated_at":"2025-05-12T10:42:10.000Z","dependencies_parsed_at":"2023-01-24T13:31:34.506Z","dependency_job_id":null,"html_url":"https://github.com/ialhashim/DenseDepth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialhashim%2FDenseDepth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialhashim%2FDenseDepth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialhashim%2FDenseDepth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ialhashim%2FDenseDepth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ialhashim","download_url":"https://codeload.github.com/ialhashim/DenseDepth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254404357,"owners_count":22065641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","deep-neural-networks","depth-estimation","encoder-decoder-model","keras-tensorflow","python","pytorch","transfer-learning"],"created_at":"2024-09-24T20:06:00.118Z","updated_at":"2025-05-15T19:08:32.329Z","avatar_url":"https://github.com/ialhashim.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## [High Quality Monocular Depth Estimation via Transfer Learning (arXiv 2018)](https://arxiv.org/abs/1812.11941)\n[Ibraheem Alhashim](https://ialhashim.github.io/) and Peter Wonka\n\n**[Update] Our latest method with better performance can be found here [AdaBins](https://github.com/shariqfarooq123/AdaBins).**\n\nOffical Keras (TensorFlow) implementaiton. If you have any questions or need more help with the code, contact the **first author**.\n\n**[Update]** Added a [Colab notebook](https://github.com/ialhashim/DenseDepth/blob/master/DenseDepth.ipynb) to try the method on the fly.\n\n**[Update]** Experimental TensorFlow 2.0 implementation added.\n\n**[Update]** Experimental PyTorch code added.\n\n## Results\n\n* KITTI\n\u003cp align=\"center\"\u003e\u003cimg style=\"max-width:500px\" src=\"https://s3-eu-west-1.amazonaws.com/densedepth/densedepth_results_01.jpg\" alt=\"KITTI\"\u003e\u003c/p\u003e\n\n* NYU Depth V2\n\u003cp align=\"center\"\u003e\n  \u003cimg style=\"max-width:500px\" src=\"https://s3-eu-west-1.amazonaws.com/densedepth/densedepth_results_02.jpg\" alt=\"NYU Depth v2\"\u003e\n  \u003cimg style=\"max-width:500px\" src=\"https://s3-eu-west-1.amazonaws.com/densedepth/densedepth_results_03.jpg\" alt=\"NYU Depth v2 table\"\u003e\n\u003c/p\u003e\n\n## Requirements\n* This code is tested with Keras 2.2.4, Tensorflow 1.13, CUDA 10.0, on a machine with an NVIDIA Titan V and 16GB+ RAM running on Windows 10 or Ubuntu 16.\n* Other packages needed `keras pillow matplotlib scikit-learn scikit-image opencv-python pydot` and `GraphViz` for the model graph visualization and `PyGLM PySide2 pyopengl` for the GUI demo.\n* Minimum hardware tested on for inference NVIDIA GeForce 940MX (laptop) / NVIDIA GeForce GTX 950 (desktop).\n* Training takes about 24 hours on a single NVIDIA TITAN RTX with batch size 8.\n\n## Pre-trained Models\n* [NYU Depth V2](https://drive.google.com/file/d/19dfvGvDfCRYaqxVKypp1fRHwK7XtSjVu/view?usp=sharing) (165 MB)\n* [KITTI](https://drive.google.com/file/d/19flUnbJ_6q2xtjuUQvjt1Y1cJRwOr-XY/view?usp=sharing) (165 MB)\n\n## Demos\n* After downloading the pre-trained model (nyu.h5), run `python test.py`. You should see a montage of images with their estimated depth maps.\n* **[Update]** A Qt demo showing 3D point clouds from the webcam or an image. Simply run `python demo.py`. It requires the packages `PyGLM PySide2 pyopengl`. \n\u003cp align=\"center\"\u003e\n  \u003cimg style=\"max-width:500px\" src=\"https://s3-eu-west-1.amazonaws.com/densedepth/densedepth_results_04.jpg\" alt=\"RGBD Demo\"\u003e\n\u003c/p\u003e\n\n## Data\n* [NYU Depth V2 (50K)](https://tinyurl.com/nyu-data-zip) (4.1 GB): You don't need to extract the dataset since the code loads the entire zip file into memory when training.\n* [KITTI](http://www.cvlibs.net/datasets/kitti/): copy the raw data to a folder with the path '../kitti'. Our method expects dense input depth maps, therefore, you need to run a depth [inpainting method](https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html) on the Lidar data. For our experiments, we used our [Python re-implmentaiton](https://gist.github.com/ialhashim/be6235489a9c43c6d240e8331836586a) of the Matlab code provided with NYU Depth V2 toolbox. The entire 80K images took 2 hours on an 80 nodes cluster for inpainting. For our training, we used the subset defined [here](https://s3-eu-west-1.amazonaws.com/densedepth/kitti_train.csv).\n* [Unreal-1k](https://github.com/ialhashim/DenseDepth): coming soon.\n\n## Training\n* Run `python train.py --data nyu --gpus 4 --bs 8`.\n\n## Evaluation\n* Download, but don't extract, the ground truth test data from [here](https://s3-eu-west-1.amazonaws.com/densedepth/nyu_test.zip) (1.4 GB). Then simply run `python evaluate.py`.\n\n## Reference\nCorresponding paper to cite:\n```\n@article{Alhashim2018,\n  author    = {Ibraheem Alhashim and Peter Wonka},\n  title     = {High Quality Monocular Depth Estimation via Transfer Learning},\n  journal   = {arXiv e-prints},\n  volume    = {abs/1812.11941},\n  year      = {2018},\n  url       = {https://arxiv.org/abs/1812.11941},\n  eid       = {arXiv:1812.11941},\n  eprint    = {1812.11941}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fialhashim%2Fdensedepth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fialhashim%2Fdensedepth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fialhashim%2Fdensedepth/lists"}