All Projects → sxhxliang → detectron2_backbone

sxhxliang / detectron2_backbone

Licence: other
detectron2 backbone: resnet18, efficientnet, hrnet, mobilenet v2, resnest, bifpn

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to detectron2 backbone

flexible-yolov5
More readable and flexible yolov5 with more backbone(resnet, shufflenet, moblienet, efficientnet, hrnet, swin-transformer) and (cbam,dcn and so on), and tensorrt
Stars: ✭ 282 (+64.91%)
Mutual labels:  backbone, efficientnet, hrnet
ai-background-remove
Cut out objects and remove backgrounds from pictures with artificial intelligence
Stars: ✭ 70 (-59.06%)
Mutual labels:  detectron2
food-detection-yolov5
🍔🍟🍗 Food analysis baseline with Theseus. Integrate object detection, image classification and multi-class semantic segmentation. 🍞🍖🍕
Stars: ✭ 68 (-60.23%)
Mutual labels:  efficientnet
Awesome-Vision-Transformer-Collection
Variants of Vision Transformer and its downstream tasks
Stars: ✭ 124 (-27.49%)
Mutual labels:  backbone
GDR-Net
GDR-Net: Geometry-Guided Direct Regression Network for Monocular 6D Object Pose Estimation. (CVPR 2021)
Stars: ✭ 167 (-2.34%)
Mutual labels:  detectron2
backscatter
Reactive extension for Backbone
Stars: ✭ 17 (-90.06%)
Mutual labels:  backbone
Yet-Another-Anime-Segmenter
Instance segmentation for anime characters based on CondInst and SOLOv2
Stars: ✭ 171 (+0%)
Mutual labels:  detectron2
react-todos
Backbone's example TODO app with React Components for views
Stars: ✭ 29 (-83.04%)
Mutual labels:  backbone
DA-RetinaNet
Official Detectron2 implementation of DA-RetinaNet of our Image and Vision Computing 2021 work 'An unsupervised domain adaptation scheme for single-stage artwork recognition in cultural sites'
Stars: ✭ 31 (-81.87%)
Mutual labels:  detectron2
efficientnet-jax
EfficientNet, MobileNetV3, MobileNetV2, MixNet, etc in JAX w/ Flax Linen and Objax
Stars: ✭ 114 (-33.33%)
Mutual labels:  efficientnet
pytorch-android
[EXPERIMENTAL] Demo of using PyTorch 1.0 inside an Android app. Test with your own deep neural network such as ResNet18/SqueezeNet/MobileNet v2 and a phone camera.
Stars: ✭ 105 (-38.6%)
Mutual labels:  resnet18
efficientnetv2.pytorch
PyTorch implementation of EfficientNetV2 family
Stars: ✭ 366 (+114.04%)
Mutual labels:  efficientnet
Ensemble-of-Multi-Scale-CNN-for-Dermatoscopy-Classification
Fully supervised binary classification of skin lesions from dermatoscopic images using an ensemble of diverse CNN architectures (EfficientNet-B6, Inception-V3, SEResNeXt-101, SENet-154, DenseNet-169) with multi-scale input.
Stars: ✭ 25 (-85.38%)
Mutual labels:  efficientnet
BCNet
Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]
Stars: ✭ 434 (+153.8%)
Mutual labels:  detectron2
backbone.react-bridge
Transform Backbone views to React components and vice versa
Stars: ✭ 26 (-84.8%)
Mutual labels:  backbone
awesome-computer-vision-models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 419 (+145.03%)
Mutual labels:  efficientnet
efficientdet
PyTorch Implementation of the state-of-the-art model for object detection EfficientDet [pre-trained weights provided]
Stars: ✭ 21 (-87.72%)
Mutual labels:  efficientnet
NestedReact
BackboneJS compatibility layer for React-MVx MVVM framework.
Stars: ✭ 79 (-53.8%)
Mutual labels:  backbone
simple-HigherHRNet
Multi-person Human Pose Estimation with HigherHRNet in Pytorch
Stars: ✭ 122 (-28.65%)
Mutual labels:  hrnet
TensorMONK
A collection of deep learning models (PyTorch implemtation)
Stars: ✭ 21 (-87.72%)
Mutual labels:  efficientnet

Detectron2_Backbone

Installation

First install Detectron2 following the official guide: INSTALL.md. Then build detectron2_backbone with:

git clone https://github.com/sxhxliang/detectron2_backbone.git
cd detectron2_backbone
python setup.py build develop

Quick Start

  1. install detectron2 and detectron2_backbone
  2. import detectron2, import detectron2.
  3. import detectron2_backbone import detectron2_backbone
  4. add config to detectron2
# for example
# import detectron2
import detectron2 
from detectron2.config import get_cfg
# import detectron2_backbone
from detectron2_backbone import backbone
from detectron2_backbone.config import add_backbone_config

def setup(args):
    """
    Create configs and perform basic setups.
    """
    cfg = get_cfg()
    # add config to detectron2
    add_backbone_config(cfg)
    cfg.merge_from_file(args.config_file)
    cfg.merge_from_list(args.opts)
    cfg.freeze()
    default_setup(cfg, args)
    return cfg

Build Your Own Models

# your_config.yaml
MODEL:
  WEIGHTS: "your_path/resnet18_detectron2.pth"
  BACKBONE:
    NAME: "build_resnet18_fpn_backbone"
  ...

Backbones for Detectron2

resnet18:

  • build_resnet18_bacbkone
  • build_resnet18_fpn_backbone
  • build_fcos_resnet18_fpn_backbone

efficientnet:

  • build_efficientnet_backbone
  • build_efficientnet_fpn_backbone
  • build_fcos_efficientnet_fpn_backbone
# your_config.yaml
MODEL:
  WEIGHTS: "your_path/efficientnet_b0_detectron2.pth"
  BACKBONE:
    NAME: "build_efficientnet_fpn_backbone"
  EFFICIENTNET:
    NAME: "efficientnet_b0" # efficientnet_b1, efficientnet_2,  ..., efficientnet_b7
    OUT_FEATURES: ["stride4", "stride8", "stride16", "stride32"]
  FPN:
    IN_FEATURES: ["stride4", "stride8", "stride16", "stride32"]
  ...

dla:

  • build_dla_backbone
  • build_dla_fpn_backbone
  • build_fcos_dla_fpn_backbone

resnest:

  • build_resnest_backbone
  • build_resnest_fpn_backbone
  • build_fcos_resnest_fpn_backbone

vovnet:

  • build_vovnet_backbone
  • build_vovnet_fpn_backbone
  • build_fcos_vovnet_fpn_backbone

mobilenet v2:

  • build_mnv2_backbone
  • build_mnv2_fpn_backbone
  • build_fcos_mnv2_fpn_backbone

hrnet:

  • build_hrnet_backbone
  • build_hrnet_fpn_backbone

bifpn:

  • build_efficientnet_bifpn_backbone
# your_config.yaml
MODEL:
  WEIGHTS: "your_path/efficientnet_b0_detectron2.pth"
  BACKBONE:
    NAME: "build_efficientnet_bifpn_backbone"
  EFFICIENTNET:
    NAME: "efficientnet_b0" # efficientnet_b1, efficientnet_2,  ..., efficientnet_b7
    OUT_FEATURES: ["stride8", "stride16", "stride32"]
  FPN:
    IN_FEATURES: ["stride8", "stride16", "stride32"]
    OUT_CHANNELS: 64
    REPEAT: 3
  ...

Convert Model for Detectron2

python3 -m detectron2_backbone.tools.convert_weight --help
# download model
wget https://github.com/lukemelas/EfficientNet-PyTorch/releases/download/1.0/efficientnet-b0-355c32eb.pth -P your_path
# convert weight
python3 -m detectron2_backbone.tools.convert_weight --model your_path/efficientnet-b0-355c32eb.pth --output your_path/efficientnet_b0_detectron2.pth
your_config.yaml
MODEL:
  WEIGHTS: "your_path/efficientnet_b0_detectron2.pth"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].