MCPcopy Index your code
hub / github.com/ashutosh1807/PixelFormer

github.com/ashutosh1807/PixelFormer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
183 symbols 500 edges 15 files 50 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PWC

PWC

PixelFormer: Attention Attention Everywhere: Monocular Depth Prediction with Skip Attention

This is the official PyTorch implementation for WACV 2023 paper 'Attention Attention Everywhere: Monocular Depth Prediction with Skip Attention'.

Paper

Installation

conda create -n pixelformer python=3.8
conda activate pixelformer
conda install pytorch=1.10.0 torchvision cudatoolkit=11.1
pip install matplotlib tqdm tensorboardX timm mmcv

Datasets

You can prepare the datasets KITTI and NYUv2 according to here, and then modify the data path in the config files to your dataset locations.

Training

First download the pretrained encoder backbone from here, and then modify the pretrain path in the config files.

Training the NYUv2 model:

python pixelformer/train.py configs/arguments_train_nyu.txt

Training the KITTI model:

python pixelformer/train.py configs/arguments_train_kittieigen.txt

Evaluation

Evaluate the NYUv2 model:

python pixelformer/eval.py configs/arguments_eval_nyu.txt

Evaluate the KITTI model:

python pixelformer/eval.py configs/arguments_eval_kittieigen.txt

Pretrained Models

  • You can download the pretrained models "nyu.pt" and "kitti.pt" from here.

Citation

If you find our work useful in your research, please cite the following:

@InProceedings{Agarwal_2023_WACV,
    author    = {Agarwal, Ashutosh and Arora, Chetan},
    title     = {Attention Attention Everywhere: Monocular Depth Prediction With Skip Attention},
    booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
    month     = {January},
    year      = {2023},
    pages     = {5861-5870}
}

Contact

For questions about our paper or code, please contact (@ashutosh1807) or raise an issue on GitHub.

Acknowledgements

Most of the code has been adpated from CVPR 2022 paper NewCRFS. We thank Weihao Yuan for releasing the source code for the same.

Also, thanks to Microsoft Research Asia for opening source of the excellent work Swin Transformer.

Core symbols most depended-on inside this repo

flip_lr
called by 7
pixelformer/utils.py
post_process_depth
called by 5
pixelformer/utils.py
np_to_qimage
called by 5
pixelformer/demo.py
updateCloud
called by 4
pixelformer/demo.py
resize
called by 4
pixelformer/networks/utils.py
train
called by 4
pixelformer/networks/swin_transformer.py
compute_errors
called by 3
pixelformer/utils.py
load_model
called by 3
pixelformer/demo.py

Shape

Method 104
Function 51
Class 28

Languages

Python100%

Modules by API surface

pixelformer/demo.py36 symbols
pixelformer/networks/swin_transformer.py27 symbols
pixelformer/networks/PQI.py19 symbols
pixelformer/utils.py18 symbols
pixelformer/dataloaders/dataloader_kittipred.py17 symbols
pixelformer/dataloaders/dataloader.py17 symbols
pixelformer/networks/SAM.py14 symbols
pixelformer/networks/PixelFormer.py11 symbols
pixelformer/networks/utils.py10 symbols
pixelformer/load.py4 symbols
pixelformer/eval.py4 symbols
pixelformer/train.py3 symbols

For agents

$ claude mcp add PixelFormer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact