{"id":22011879,"url":"https://github.com/cocowy1/adstereo","last_synced_at":"2025-05-06T20:11:21.007Z","repository":{"id":260238767,"uuid":"866503195","full_name":"cocowy1/ADStereo","owner":"cocowy1","description":"[TIP 2025] ADStereo: Efficient Stereo Matching with Adaptive Downsampling and Disparity Alignment","archived":false,"fork":false,"pushed_at":"2025-02-21T06:45:08.000Z","size":22937,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T02:33:50.097Z","etag":null,"topics":["depth-estimation","efficient","stereo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cocowy1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-02T11:34:34.000Z","updated_at":"2025-03-02T21:29:56.000Z","dependencies_parsed_at":"2025-02-21T07:36:53.107Z","dependency_job_id":null,"html_url":"https://github.com/cocowy1/ADStereo","commit_stats":null,"previous_names":["cocowy1/adstereo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocowy1%2FADStereo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocowy1%2FADStereo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocowy1%2FADStereo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocowy1%2FADStereo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cocowy1","download_url":"https://codeload.github.com/cocowy1/ADStereo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252761228,"owners_count":21800125,"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":["depth-estimation","efficient","stereo"],"created_at":"2024-11-30T02:45:15.004Z","updated_at":"2025-05-06T20:11:20.986Z","avatar_url":"https://github.com/cocowy1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ADStereo: Efficient Stereo Matching with Adaptive Downsampling and Disparity Alignment [TIP 2025](https://ieeexplore.ieee.org/document/10890914)\nThis paper presents two sampling strategies: the Adaptive Downsampling Module (ADM) and the Disparity Alignment Module (DAM), to prioritize real-time inference while ensuring accuracy. The ADM leverages local features to learn adaptive weights, enabling more effective downsampling while preserving crucial structure information. On the other hand, the DAM employs a learnable interpolation strategy to predict transformation offsets of pixels, thereby mitigating the spatial misalignment issue. \nBuilding upon these modules, we introduce **ADStereo**, a real-time yet accurate network that achieves highly competitive performance on multiple public benchmarks. \n\n# Demo on KITTI raw data\nThe pretrained KITTI model is loaded from  './fined/KITTI/' datafolders. \n\nhttps://github.com/user-attachments/assets/326230a6-871d-47ca-abf2-8a5ac4d959b7\n\nRun `demo_video.py` to perform stereo matching on the raw Kitti sequence.\nHere is an example result on our system with RTX a5000ada on Ubuntu 20.04\n\n\n# Adaptive Downsampling Module \\\u0026 Disparity Alignment Module\n\n|||\n|--|--|\n| \u003cimg src=\"https://github.com/cocowy1/ADStereo/blob/main/figs/ADM.png\"\u003e | \u003cimg src=\"https://github.com/cocowy1/ADStereo/blob/main/figs/disparity_alignment.png\"\u003e |\n\n# Overview\n\u003cimg width=\"900\" src=\"https://github.com/cocowy1/ADStereo/blob/main/figs/framework.png\"/\u003e\u003c/div\u003e\n\n# New Added\nWe introduce a more lightweight model called  **ADStereo_fast** (highly competetive performance \u0026 faster speed), also included in this repo.\n\n# Quantative Results\n![image](https://github.com/user-attachments/assets/1526061f-c624-47af-8009-08ec8c14be26)\n\n# Model Zoo\n\nAll pretrained models are available in the [Google Driver:ADStereo](https://drive.google.com/drive/folders/1jdx4-gU8WuytiolZbGDLI-NSUHlQWuH4) and [Google Driver:ADStereo_fast](https://drive.google.com/drive/folders/1WcGgA7OS1lf5JJ3ajbXw-hMtz8cXrQ7k?dmr=1\u0026ec=wgc-drive-globalnav-goto)\n\nWe assume the downloaded weights are located under the `./trained` directory. \n\nOtherwise, you may need to change the corresponding paths in the scripts.\n\n\n# Environment\n```\nPython 3.9\nPytorch 2.4.0\n```\n# Create a virtual environment and activate it.\n```\nconda create -n ADStereo python=3.9\nconda activate ADStereo\n```\n\n# Dependencies\n```\nconda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch -c nvidia\npip install opencv-python\npip install scikit-image\npip install tensorboard\npip install matplotlib \npip install tqdm\npip install chardet\npip install imageio\npip install thop\npip install timm==0.5.4\n```\n\n# 1. Prepare training data\nTo evaluate/train ADStereo, you will need to download the required datasets.\n\n[SceneFlow](https://lmb.informatik.uni-freiburg.de/resources/datasets/SceneFlowDatasets.en.html)\n\n[KITTI](https://www.cvlibs.net/datasets/kitti/eval_scene_flow.php?benchmark=stereo)\n\n[Middlebury](https://vision.middlebury.edu/stereo/submit3/)\n\n[ETH3D](https://www.eth3d.net/datasets#low-res-two-view-test-data)\n\nBy default `datasets.py` will search for the datasets in these locations.\n\n```bash\nDATA\n├── KITTI\n│   ├── kitti_2012\n│   │   └── training\n        └── testing\n│   ├── kitti_2015\n│   │   └── training\n        └── testing\n└── SceneFlow\n    ├── Driving\n    │   ├── disparity\n    │   └── frames_finalpass\n    ├── FlyingThings3D\n    │   ├── disparity\n    │   └── frames_finalpass\n    └── Monkaa\n        ├── disparity\n        └── frames_finalpass\n└── Middlebury\n    ├── trainingH\n    ├── trainingH_GT\n└── ETH3D\n    ├── two_view_training\n    ├── two_view_training_gt\n```\n\n# 2. Train on SceneFlow\nRun `main.py` to train on the SceneFlow dataset. Please update datapath in `main.py` as your training data path.\n\n# 3. Finetune \\\u0026 Inference \nRun `finetune.py` to finetune on the different real-world datasets, such as KITTI 2012, KITTI 2015, and ETH3D. Please update datapath in `finetune.py` as your training data path.\n\n# 4. Evaluate FLOPs \nRun `counts_op.py` to validate FLOPs consumption.\n# 5. Results\n\u003cimg width=\"1000\" src=\"https://github.com/cocowy1/ADStereo/blob/main/figs/compare.png\"/\u003e\u003c/div\u003e\n\nTo generate prediction results on the test set of the KITTI dataset, you can run `evaluate_kitti.py`. \nThe inference time can be printed  once you run `evaluate_kitti.py`. \nAnd the inference results on the KITTI dataset can be directly submitted to the online evaluation server for benchmarking.\n\n\n## Citation\n\nIf you find our work useful in your research, please consider citing our paper:\n\n```bibtex\n\n@article{wang2025ad,\n  author={Wang, Yun and Li, Kunhong and Wang, Longguang and Hu, Junjie and Wu, Dapeng Oliver and Guo, Yulan},\n  journal={IEEE Transactions on Image Processing}, \n  title={ADStereo: Efficient Stereo Matching with Adaptive Downsampling and Disparity Alignment}, \n  journal={IEEE Transactions on Image Processing},\n  year={2025},\n  publisher={IEEE}\n}\n\n```\n\n\n# Acknowledgements\n\nThis project is based on [GwcNet](https://github.com/xy-guo/GwcNet), [IGEV-Stereo](https://github.com/gangweiX/IGEV), and [CoEx](https://github.com/antabangun/coex). We thank the original authors for their excellent works.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcocowy1%2Fadstereo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcocowy1%2Fadstereo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcocowy1%2Fadstereo/lists"}