{"id":21946691,"url":"https://github.com/baegwangbin/irondepth","last_synced_at":"2026-03-04T08:01:17.494Z","repository":{"id":61600622,"uuid":"546733893","full_name":"baegwangbin/IronDepth","owner":"baegwangbin","description":"[BMVC 2022] IronDepth: Iterative Refinement of Single-View Depth using Surface Normal and its Uncertainty","archived":false,"fork":false,"pushed_at":"2023-04-29T15:16:34.000Z","size":19902,"stargazers_count":181,"open_issues_count":4,"forks_count":10,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-08-21T11:52:29.811Z","etag":null,"topics":["3d-reconstruction","bmvc2022","computer-vision","deep-learning","depth-estimation","monocular-depth-estimation","surface-normal","surface-normals","uncertainty"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baegwangbin.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,"governance":null}},"created_at":"2022-10-06T14:56:23.000Z","updated_at":"2025-08-11T04:23:45.000Z","dependencies_parsed_at":"2023-12-04T15:12:56.040Z","dependency_job_id":null,"html_url":"https://github.com/baegwangbin/IronDepth","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"c1ee25a14d9728e8fdc0d1aff9f20b963267300f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baegwangbin/IronDepth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baegwangbin%2FIronDepth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baegwangbin%2FIronDepth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baegwangbin%2FIronDepth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baegwangbin%2FIronDepth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baegwangbin","download_url":"https://codeload.github.com/baegwangbin/IronDepth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baegwangbin%2FIronDepth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["3d-reconstruction","bmvc2022","computer-vision","deep-learning","depth-estimation","monocular-depth-estimation","surface-normal","surface-normals","uncertainty"],"created_at":"2024-11-29T04:34:27.910Z","updated_at":"2026-03-04T08:01:17.471Z","avatar_url":"https://github.com/baegwangbin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IronDepth: Iterative Refinement of Single-View Depth using Surface Normal and its Uncertainty\n\nOfficial implementation of the paper\n\n\u003e **IronDepth: Iterative Refinement of Single-View Depth using Surface Normal and its Uncertainty** \\\n\u003e BMVC 2022 \\\n\u003e [Gwangbin Bae](https://baegwangbin.com), [Ignas Budvytis](https://mi.eng.cam.ac.uk/~ib255/), and [Roberto Cipolla](https://mi.eng.cam.ac.uk/~cipolla/) \\\n\u003e [[arXiv]](https://arxiv.org/abs/2210.03676) [[demo]](https://www.youtube.com/watch?v=mf8keH9brF0) [[project page]](https://baegwangbin.github.io/IronDepth/)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=100% src=\"https://github.com/baegwangbin/IronDepth/blob/main/docs/img/irondepth/IronDepth_short.gif\"\u003e\n\u003c/p\u003e\n\n## Summary\n\n* We use [surface normal](https://github.com/baegwangbin/surface_normal_uncertainty) to propagate depth between pixels.\n* We formulate depth refinement/upsampling as classification of choosing the neighboring pixel to propagate from.\n\n## Getting Started\n\nWe recommend using a virtual environment.\n```\npython3.6 -m venv --system-site-packages ./venv\nsource ./venv/bin/activate\n```\n\nInstall the necessary dependencies by\n```\npython3.6 -m pip install -r requirements.txt\n```\n\nGo to this [google drive](https://drive.google.com/drive/folders/1idIVqOrJOK6kuidBng1K8sth-CyOfcCj?usp=sharing), and\n\n* Download `*.pt` and place them under `./checkpoints`. \n* Download and unzip `examples.zip` as `./examples`.\n\n## Testing\n\n```python\n# test on scannet images, using the model trained on scannet\npython test.py --train_data scannet --test_data scannet\n\n# test on nyuv2 images, using the model trained on nyuv2\npython test.py --train_data nyuv2 --test_data nyuv2\n\n# test on your own images, using the model trained on scannet\npython test.py --train_data scannet --test_data custom\n```\n\n* This generates output visualizations under `./examples/output/dataset_name/`.\n* Comment out unnecessary visualization scripts to speed things up.\n* When testing on your own images, you should place the images under `./examples/data/custom/`. We support `.png` and `.jpg` files. If you wish to provide the camera intrinsics, add a file named `img_name.txt`. The file should contain `fx`, `fy`, `cx` and `cy`. See `./examples/data/custom/ex01.txt` as an example.\n\n## Training\n\nWe provide the training script for ScanNet images. It is straightforward to apply the same code for other datasets. \n\n### Step 1. Data Preparation\n\nFirstly, go to this [google drive](https://drive.google.com/drive/folders/1idIVqOrJOK6kuidBng1K8sth-CyOfcCj?usp=sharing). Download and unzip `scannet.zip` as `./scannet`. The folder has two sub-folders named `train` and `test`. For each of them, there is a set of `scenes`. Images in each scene are assumed to be taken with the same camera. The camera intrinsics `(fx, fy, cx, cy)` should be provided as `intrins.txt`. For each image, you should have four files:\n\n* `000000_img.png`: RGB image\n* `000000_depth.png`: GT depth map\n* `000000_norm.png`: Predicted normal map\n* `000000_kappa.png`: Predicted normal uncertainty\n\nWe generated normal predictions *offline* instead of generating them on the fly. If you have a dataset with no surface normal prediction, add additional scenes/images and run\n\n```\npython preprocess.py\n```\n\n### Step 2. Training\n\nTo train the network, run\n\n```\npython train.py\n```\n\nNote that the provided `scannet` mini dataset only contains 100 images for training and 10 images for testing. You should train the network on a bigger dataset to obtain satisfactory results.\n\n## Citation\n\nIf you find our work useful in your research please consider citing our papers:\n\n```\n@InProceedings{Bae2022,\n    title   = {IronDepth: Iterative Refinement of Single-View Depth using Surface Normal and its Uncertainty}\n    author  = {Gwangbin Bae and Ignas Budvytis and Roberto Cipolla},\n    booktitle = {British Machine Vision Conference (BMVC)},\n    year = {2022}                         \n}\n```\n\n```\n@InProceedings{Bae2021,\n    title   = {Estimating and Exploiting the Aleatoric Uncertainty in Surface Normal Estimation}\n    author  = {Gwangbin Bae and Ignas Budvytis and Roberto Cipolla},\n    booktitle = {International Conference on Computer Vision (ICCV)},\n    year = {2021}                         \n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaegwangbin%2Firondepth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaegwangbin%2Firondepth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaegwangbin%2Firondepth/lists"}