gyyang23/AFPN

Jupyter Notebook

145

14 commits

updated Sep 5, 2024

See the code

README

AFPN: Asymptotic Feature Pyramid Network for Object Detection (arXiv)

By Guoyu Yang, Jie Lei, Zhikuan Zhu, Siyu Cheng, Zunlei Feng, Ronghua Liang

This project is based on mmdetection.

Environment

mmengine==0.7.3
mmcv==2.0.0
mmdet==3.0.0
mmyolo==0.5.0

Install

Please refer to mmdetection for installation.

Dataset

AFPN
├── mmdetection
├── data
│   ├── coco
│   │   ├── annotations
│   │   ├── train2017
│   │   ├── val2017
│   │   ├── test2017
├── faster-rcnn_r50_afpn_1x_coco.py
├── train.py
├── test.py

Training

Single gpu for train:

CUDA_VISIBLE_DEVICES=0 python ./mmdetection/tools/train.py faster-rcnn_r50_afpn_1x_coco.py --work-dir ./weight/

Multiple gpus for train:

CUDA_VISIBLE_DEVICES=0,1 ./mmdetection/tools/dist_train.sh faster-rcnn_r50_afpn_1x_coco.py 2 --work-dir ./weight/

Train in pycharm: If you want to train in pycharm, you can run it in train.py.

see more details at mmdetection.

Testing

CUDA_VISIBLE_DEVICES=0 python ./mmdetection/tools/test.py faster-rcnn_r50_afpn_1x_coco.py <CHECKPOINT_FILE>

For example,

CUDA_VISIBLE_DEVICES=0 python ./mmdetection/tools/test.py faster-rcnn_r50_afpn_1x_coco.py ./weight/afpn_weight.pth

Test in pycharm: If you want to test in pycharm, you can run it in test.py.

see more details at mmdetection.

Results on MS COCO val2017

DetectorBackboneImage sizeGFLOPsParams (M)APAP0.5AP0.75Weight
Faster R-CNN + FPNResNet-50640 x 64091.341.837.457.340.3None
Faster R-CNN + AFPNResNet-50640 x 64089.749.839.057.642.0Link
YOLOv5-n + YOLOv5PAFPNCSPDarknet640 x 6402.261.8728.045.929.4Link
YOLOv5-n + YOLOv5AFPNCSPDarknet640 x 6402.181.6729.145.830.7Link

Citations

If you find AFPN useful in your research, please consider citing:

@article{yang2023afpn,
  title={AFPN: Asymptotic Feature Pyramid Network for Object Detection},
  author={Yang, Guoyu and Lei, Jie and Zhu, Zhikuan and Cheng, Siyu and Feng, Zunlei and Liang, Ronghua},
  journal={arXiv preprint arXiv:2306.15988},
  year={2023}
}

or

@article{yang2024asymptotic,
  title={Asymptotic Feature Pyramid Network for Labeling Pixels and Regions},
  author={Yang, Guoyu and Lei, Jie and Tian, Hao and Feng, Zunlei and Liang, Ronghua},
  journal={IEEE Transactions on Circuits and Systems for Video Technology},
  year={2024},
  publisher={IEEE}
}

gyyang23/AFPN

Jupyter Notebook

145

14 commits

updated Sep 5, 2024

See the code

README

AFPN: Asymptotic Feature Pyramid Network for Object Detection (arXiv)

By Guoyu Yang, Jie Lei, Zhikuan Zhu, Siyu Cheng, Zunlei Feng, Ronghua Liang

This project is based on mmdetection.

Environment

mmengine==0.7.3
mmcv==2.0.0
mmdet==3.0.0
mmyolo==0.5.0

Install

Please refer to mmdetection for installation.

Dataset

AFPN
├── mmdetection
├── data
│   ├── coco
│   │   ├── annotations
│   │   ├── train2017
│   │   ├── val2017
│   │   ├── test2017
├── faster-rcnn_r50_afpn_1x_coco.py
├── train.py
├── test.py

Training

Single gpu for train:

CUDA_VISIBLE_DEVICES=0 python ./mmdetection/tools/train.py faster-rcnn_r50_afpn_1x_coco.py --work-dir ./weight/

Multiple gpus for train:

CUDA_VISIBLE_DEVICES=0,1 ./mmdetection/tools/dist_train.sh faster-rcnn_r50_afpn_1x_coco.py 2 --work-dir ./weight/

Train in pycharm: If you want to train in pycharm, you can run it in train.py.

see more details at mmdetection.

Testing

CUDA_VISIBLE_DEVICES=0 python ./mmdetection/tools/test.py faster-rcnn_r50_afpn_1x_coco.py <CHECKPOINT_FILE>

For example,

CUDA_VISIBLE_DEVICES=0 python ./mmdetection/tools/test.py faster-rcnn_r50_afpn_1x_coco.py ./weight/afpn_weight.pth

Test in pycharm: If you want to test in pycharm, you can run it in test.py.

see more details at mmdetection.

Results on MS COCO val2017

DetectorBackboneImage sizeGFLOPsParams (M)APAP0.5AP0.75Weight
Faster R-CNN + FPNResNet-50640 x 64091.341.837.457.340.3None
Faster R-CNN + AFPNResNet-50640 x 64089.749.839.057.642.0Link
YOLOv5-n + YOLOv5PAFPNCSPDarknet640 x 6402.261.8728.045.929.4Link
YOLOv5-n + YOLOv5AFPNCSPDarknet640 x 6402.181.6729.145.830.7Link

Citations

If you find AFPN useful in your research, please consider citing:

@article{yang2023afpn,
  title={AFPN: Asymptotic Feature Pyramid Network for Object Detection},
  author={Yang, Guoyu and Lei, Jie and Zhu, Zhikuan and Cheng, Siyu and Feng, Zunlei and Liang, Ronghua},
  journal={arXiv preprint arXiv:2306.15988},
  year={2023}
}

or

@article{yang2024asymptotic,
  title={Asymptotic Feature Pyramid Network for Labeling Pixels and Regions},
  author={Yang, Guoyu and Lei, Jie and Tian, Hao and Feng, Zunlei and Liang, Ronghua},
  journal={IEEE Transactions on Circuits and Systems for Video Technology},
  year={2024},
  publisher={IEEE}
}