{"name":"MonoPCC: Photometric-invariant Cycle Constraint for Monocular Depth Estimation","description":"MonoPCC is a PyTorch implementation for monocular depth estimation, specifically designed for endoscopic images using a photometric-invariant cycle constraint. This self-supervised learning approach aims to improve depth prediction accuracy in challenging medical imaging scenarios. It demonstrates state-of-the-art performance on datasets like SCARED and KITTI, and offers a plug-and-play design for integration into various backbone networks.","github":"https://github.com/adam99goat/MonoPCC","url":"https://osrepos.com/repo/adam99goat-monopcc","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/adam99goat-monopcc","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/adam99goat-monopcc.md","json":"https://osrepos.com/repo/adam99goat-monopcc.json","topics":["3d-reconstruction","endoscopy","monocular-depth-estimation","self-supervised-learning","Python","Medical Imaging","Computer Vision"],"keywords":["3d-reconstruction","endoscopy","monocular-depth-estimation","self-supervised-learning","Python","Medical Imaging","Computer Vision"],"stars":null,"summary":"MonoPCC is a PyTorch implementation for monocular depth estimation, specifically designed for endoscopic images using a photometric-invariant cycle constraint. This self-supervised learning approach aims to improve depth prediction accuracy in challenging medical imaging scenarios. It demonstrates state-of-the-art performance on datasets like SCARED and KITTI, and offers a plug-and-play design for integration into various backbone networks.","content":"## Introduction\nMonoPCC presents a novel PyTorch implementation for monocular depth estimation, primarily focusing on endoscopic images. This project introduces a photometric-invariant cycle constraint, enhancing the accuracy and robustness of depth prediction in complex medical environments. As a self-supervised learning framework, MonoPCC addresses the challenges of acquiring ground truth depth data in endoscopy by leveraging image sequences.\n\n## Installation\nTo set up MonoPCC, it is recommended to use a `conda` environment with Python 3.7. The necessary dependencies can be installed using `pip` and `pip3` as follows:\n\nshell\npip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0\npip install dominate==2.4.0 Pillow==6.1.0 visdom==0.1.8\npip install tensorboardX==1.4 opencv-python matplotlib scikit-image\npip3 install mmcv-full==1.3.0 mmsegmentation==0.11.0\npip install timm einops IPython\n\n\nData preparation involves datasets such as SCARED, SimCol3D, and SERV-CT. Specific training/test splits for SCARED are defined in `splits/endovis`, with further preprocessing details available in the [AF-SfMLearner repository](https://github.com/ShuweiShao/AF-SfMLearner){target=\"_blank\"}.\n\n## Examples\nMonoPCC provides comprehensive evaluation scripts and pre-trained models.\n\n*   **Depth Estimation on SCARED**: To evaluate depth estimation on the SCARED dataset, first prepare ground truth depth maps following the [AF-SfMLearner guide](https://github.com/ShuweiShao/AF-SfMLearner/blob/main/export_gt_depth.py){target=\"_blank\"}. Then, run the evaluation command:\n    shell\n    CUDA_VISIBLE_DEVICES=0 python evaluate_depth.py --data_path <your_data_path> --load_weights_folder <your_weight_path> \\\n        --eval_split endovis --dataset endovis --max_depth 150 --png --eval_mono\n    \n    MonoPCC consistently achieves state-of-the-art results, outperforming several baselines.\n\n*   **Plug and Play Design**: The Photometric-invariant Cycle Constraint (PCC) is designed to be plug-and-play, allowing integration into various backbone networks. For instance, when integrated with [EndoDAC](https://arxiv.org/abs/2405.08672){target=\"_blank\"}, PCC further enhances its performance.\n\n*   **Pose Estimation**: MonoPCC also supports pose estimation. After preparing ground truth pose data as described in [AF-SfMLearner](https://github.com/ShuweiShao/AF-SfMLearner/blob/main/export_gt_pose.py){target=\"_blank\"}, you can evaluate pose estimation using the provided PoseNet models:\n    shell\n    CUDA_VISIBLE_DEVICES=0 python evaluate_pose.py --data_path <your_data_path> --load_weights_folder <your_weight_path>\n    \n    Visual trajectories can be generated to demonstrate the accuracy of pose estimation.\n\n*   **3D Reconstruction Demo**: The project showcases a demo of 3D reconstruction using MonoPCC to estimate depth maps from video sequences, which are then used with tools like [ElasticFusion](https://github.com/mp3guy/ElasticFusion){target=\"_blank\"} to generate 3D models.\n\n*   **KITTI Dataset Evaluation**: To demonstrate its effectiveness in general scenarios, MonoPCC has been evaluated on the [KITTI dataset](http://www.cvlibs.net/datasets/kitti/raw_data.php){target=\"_blank\"}. The evaluation command is:\n    shell\n    CUDA_VISIBLE_DEVICES=0 python evaluate_depth_kitti.py --data_path <kitti_data_path> --load_weights_folder <your_weight_path> \\\n        --eval_split eigen --dataset kitti --eval_mono\n    \n    MonoPCC achieves competitive results on KITTI, validating its broad applicability.\n\n## Why Use MonoPCC\nMonoPCC stands out for its innovative photometric-invariant cycle constraint, which significantly improves monocular depth estimation, especially in challenging endoscopic imaging. Its self-supervised nature reduces the need for extensive labeled data, making it highly practical. The plug-and-play design allows for easy integration into existing deep learning architectures, enhancing their performance. Furthermore, its demonstrated state-of-the-art results on both medical (SCARED) and general (KITTI) datasets highlight its robustness and versatility for various computer vision tasks.\n\n## Links\n*   **GitHub Repository**: [https://github.com/adam99goat/MonoPCC](https://github.com/adam99goat/MonoPCC){target=\"_blank\"}","metrics":{"detailViews":3,"githubClicks":11},"dates":{"published":null,"modified":"2026-02-27T21:37:06.000Z"}}