Git Product home page Git Product logo

emi-group / fapn Goto Github PK

View Code? Open in Web Editor NEW
201.0 6.0 19.0 1.31 MB

[ICCV 2021] FaPN: Feature-aligned Pyramid Network for Dense Image Prediction

Home Page: http://www.shihuahuang.cn/fapn/

License: Apache License 2.0

Python 28.62% Shell 0.03% C++ 35.49% C 5.98% Cuda 29.88%
object-detection semantic-segmentation instance-segmentation panoptic-segmentation real-time-semantic-segmentation feature-alignment

fapn's Introduction

FaPN: Feature-aligned Pyramid Network for Dense Image Prediction [arXiv] [Project Page]

@inproceedings{
  huang2021fapn,
  title={{FaPN}: Feature-aligned Pyramid Network for Dense Image Prediction},
  author={Shihua Huang and Zhichao Lu and Ran Cheng and Cheng He},
  booktitle={International Conference on Computer Vision (ICCV)},
  year={2021}
}

Overview

FaPN vs. FPN Before vs. After Alignment

This project provides the official implementation for our ICCV2021 paper "FaPN: Feature-aligned Pyramid Network for Dense Image Prediction" based on Detectron2. FaPN is a simple yet effective top-down pyramidal architecture to generate multi-scale features for dense image prediction. Comprised of a feature alignment module (FAM) and a feature selection module (FSM), FaPN addresses the issue of feature alignment in the original FPN, leading to substaintial improvements on various dense prediction tasks, such as object detection, semantic, instance, panoptic segmentation, etc.

Installation

This project is based on Detectron2, which can be constructed as follows.

Training

To train a model with 8 GPUs, run:

cd /path/to/detectron2/tools
python3 train_net.py --config-file <config.yaml> --num-gpus 8

For example, to launch Faster R-CNN training (1x schedule) with ResNet-50 backbone on 8 GPUs, one should execute:

cd /path/to/detectron2/tools
python3 train_net.py --config-file ../configs\COCO-Detection\faster_rcnn_R_50_FAN_1x.yaml --num-gpus 8

Evaluation

To evaluate a pre-trained model with 8 GPUs, run:

cd /path/to/detectron2/tools
python3 train_net.py --config-file <config.yaml> --num-gpus 8 --eval-only MODEL.WEIGHTS /path/to/model_checkpoint

Results

COCO Object Detection

Faster R-CNN + FaPN:

Name lr
sched
box
AP
box
APs
box
APm
box
APl
download
R50 1x 39.2 24.5 43.3 49.1 model |  log
R101 3x 42.8 27.0 46.2 54.9 model |  log

Cityscapes Semantic Segmentation

PointRend + FaPN:

Name lr
sched
mask
mIoU
mask
i_IoU
mask
IoU_sup
mask
iIoU_sup
download
R50 1x 80.0 61.3 90.6 78.5 model |  log
R101 1x 80.1 62.2 90.8 78.6 model |  log

COCO Instance Segmentation

Mask R-CNN + FaPN:

Name lr
sched
mask
AP
mask
APs
box
AP
box
APs
download
R50 1x 36.4 18.1 39.8 24.3 model |  log
R101 3x 39.4 20.9 43.8 27.4 model |  log

PointRend + FaPN:

Name lr
sched
mask
AP
mask
APs
box
AP
box
APs
download
R50 1x 37.6 18.6 39.4 24.2 model |  log

COCO Panoptic Segmentation

PanopticFPN + FaPN:

Name lr
sched
PQ mask
mIoU
St
PQ
box
AP
Th
PQ
download
R50 1x 41.1 43.4 32.5 38.7 46.9 model |  log
R101 3x 44.2 45.7 35.0 43.0 53.3 model |  log

fapn's People

Contributors

mikelzc1990 avatar shihuahuang95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fapn's Issues

单独的FSM和FAM模块

您好,看了您的论文,希望借助一下您论文中的FSM和FAM模块,直接插入到我的网络中,但我没有找到这两个模块的单独实现,请问这两个模块的单独实现在哪里呢,谢谢

Can you give me this model?

Hello, I am very interested in your FaPN model. Seeing that the FPS of the COCO dataset is very high in semantic segmentation, can you give me this model? I want to reproduce it.
image

some errors

I want to use fapn structure in my code, but " File "/databank/home/DCNv2/dcn_v2.py", line 43, in forward
ctx.deformable_groups,
RuntimeError: expected scalar type Float but found Half" appears,How can I solve it? My version is cuda10.1, python3.7,pytoch 1.7.0

Error when train model

Hi, I follow your instructions to arrange the project. However, this error still occurs. Could you help me with this issue?

KeyError: "No object named 'build_resnet_fan_backbone' found in 'BACKBONE' registry!"

Ablation Study about other FPN-like module?

Hi, thank you for your contribution. It is a good work.

I have a small question. Have you done any ablation studies about other FPN-like modules? i.e. FPN-NAP, PAN, BIFPN, etc. It will be much more convincable if you provide such result.

Thank you.

the output channals of FeatureAlign_V2

self.dcpack_L2 = dcn_v2(out_nc, out_nc, 3, stride=1, padding=1, dilation=1, deformable_groups=8, extra_offset_mask=True)
why out_nc is 256, not 216(3 x kernel_size x kernal_size x deformable_groups) ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.