Giter Site home page Giter Site logo

res2net / res2net-detectron2 Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 9.0 645 KB

Res2Net for Panoptic Segmentation based on detectron2 (SOTA results).

Home Page: https://mmcheng.net/res2net/

License: Apache License 2.0

Python 89.21% C++ 3.55% Cuda 6.52% Shell 0.61% Dockerfile 0.11%
detectron2 multi-scale panoptic res2net segmentation sota

res2net-detectron2's Introduction

Res2Net

The official pytorch implemention of the paper "Res2Net: A New Multi-scale Backbone Architecture"

Our paper is accepted by IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI).

Update

Introduction

We propose a novel building block for CNNs, namely Res2Net, by constructing hierarchical residual-like connections within one single residual block. The Res2Net represents multi-scale features at a granular level and increases the range of receptive fields for each network layer. The proposed Res2Net block can be plugged into the state-of-the-art backbone CNN models, e.g. , ResNet, ResNeXt, BigLittleNet, and DLA. We evaluate the Res2Net block on all these models and demonstrate consistent performance gains over baseline models.

Sample

Res2Net module

Useage

Requirement

PyTorch>=0.4.1

Examples

git clone https://github.com/gasvn/Res2Net.git

from res2net import res2net50
model = res2net50(pretrained=True)

Input image should be normalized as follows:

normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                  std=[0.229, 0.224, 0.225])

(By default, the model will be downloaded automatically. If the default download link is not available, please refer to the Download Link listed on Pretrained models.)

Pretrained models

model #Params MACCs top-1 error top-5 error Link
Res2Net-50-48w-2s 25.29M 4.2 22.68 6.47 OneDrive
Res2Net-50-26w-4s 25.70M 4.2 22.01 6.15 OneDrive
Res2Net-50-14w-8s 25.06M 4.2 21.86 6.14 OneDrive
Res2Net-50-26w-6s 37.05M 6.3 21.42 5.87 OneDrive
Res2Net-50-26w-8s 48.40M 8.3 20.80 5.63 OneDrive
Res2Net-101-26w-4s 45.21M 8.1 20.81 5.57 OneDrive
Res2NeXt-50 24.67M 4.2 21.76 6.09 OneDrive
Res2Net-DLA-60 21.15M 4.2 21.53 5.80 OneDrive
Res2NeXt-DLA-60 17.33M 3.6 21.55 5.86 OneDrive
Res2Net-v1b-50 25.72M 4.5 19.73 4.96 Link
Res2Net-v1b-101 45.23M 8.3 18.77 4.64 Link
Res2Net-v1d-200-SSLD 76.21M 15.7 14.87 2.58 PaddlePaddleLink

News

  • Res2Net_v1b is now available.
  • You can load the pretrained model by using pretrained = True.

The download link from Baidu Disk is now available. (Baidu Disk password: vbix)

Applications

Other applications such as Classification, Instance segmentation, Object detection, Semantic segmentation, Salient object detection, Class activation map,Tumor segmentation on CT scans can be found on https://mmcheng.net/res2net/ .

Citation

If you find this work or code is helpful in your research, please cite:

@article{gao2019res2net,
  title={Res2Net: A New Multi-scale Backbone Architecture},
  author={Gao, Shang-Hua and Cheng, Ming-Ming and Zhao, Kai and Zhang, Xin-Yu and Yang, Ming-Hsuan and Torr, Philip},
  journal={IEEE TPAMI},
  year={2021},
  doi={10.1109/TPAMI.2019.2938758}, 
}

Contact

If you have any questions, feel free to E-mail me via: shgao(at)live.com

License

The code is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License for Noncommercial use only. Any commercial use should get formal permission first.

res2net-detectron2's People

Contributors

gasvn avatar mingmingcheng 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

Watchers

 avatar  avatar  avatar

res2net-detectron2's Issues

cannot import name 'cfg' from 'detectron2.config'

when i try "python ./tools/train_net.py --config-file "configs/COCO-PanopticSegmentation/panoptic_fpn_R2_101_3x.yaml" --num-gpus"
i got the error ." cannot import name 'cfg' from 'detectron2.config'"

A lot of warnings in instance segmentation training

If you do not know the root cause of the problem / bug, and wish someone to help you, please
post according to this template:

Instructions To Reproduce the Issue:

  1. what changes you made (git diff) or what code you wrote
<put diff or code here>
  1. what exact command you run:
    I have tried below command

python train_net.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml --num-gpus 2 SOLVER.IMS_PER_BATCH 12 SOLVER.BASE_LR 0.005 MODEL.WEIGHTS ./imgnet_trained_model/r2_101.pkl

r2_101.pkl: file downloaded from link in this repo

However there are lots and lots of warnings. sounds like not much was loaded. please find attached for warnings
training_warnings.log

I have also tried standard command (which downloads the weights from Model.Zoo of FAIR) but the results are same.

python train_net.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml --num-gpus 2 SOLVER.IMS_PER_BATCH 12 SOLVER.BASE_LR 0.005

Could you please advise? Thank you.

  1. what you observed (including full logs):
<put logs here>
  1. please also simplify the steps as much as possible so they do not require additional resources to
    run, such as a private dataset.

Expected behavior:

I think even with res2net backbone, the training should have started clean.

If there are no obvious error in "what you observed" provided above,
please tell us the expected behavior.

If you expect the model to converge / work better, note that we do not give suggestions
on how to train a new model.
Only in one of the two conditions we will help with it:
(1) You're unable to reproduce the results in detectron2 model zoo.
(2) It indicates a detectron2 bug.

Environment:

Provide your environment information using the following command:

wget -nc -q https://github.com/facebookresearch/detectron2/raw/master/detectron2/utils/collect_env.py && python collect_env.py

If your issue looks like an installation issue / environment issue,
please first try to solve it yourself with the instructions in
https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md#common-installation-issues

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.