iKrishneel / efficient_net_v2

Pytorch implementation of efficientnet v2 backbone with detectron2 for object detection (Just for fun)
https://arxiv.org/pdf/2104.00298.pdf
11 stars 3 forks source link
convolutional-neural-networks deep-learning detectron2 efficientnet efficientnetv2 pytorch

EfficientNetV2 Detection

Implementation of EfficientNetV2 backbone for detecting objects using Detectron2. The EfficientNetV2 backbone is wrapped to detectron2 and uses the Fast/Mask RCNN heads of detectron2 for detecting objects. The architecture of the network and detector is as in the figure below.

Architecture of the network for detection.

Coco Results

The results of detection on 2017 COCO detection dataset.

Requirements

Installation

Clone the repository

$ git clone https://github.com/iKrishneel/efficient_net_v2.git

Installing on the host or virtualenv.

$ pip install -e efficient_net_v2

Using docker image

$ cd efficient_net_v2
$ IMG_NAME=effnet2_detect
$ docker buildx build -t ${IMG_NAME}:latest .

Training

The trainin procedure and arugments are same as detectron2. Please refer to the detectron2 documentations for more information the the training.

$ cd efficient_net_v2/efficient_net_v2

# common required arugments for training
$ NUM_GPUS=2 # number of GPUS for training
$ WEIGHTS=''  # path to the weight file / or you can provide this directly on the config
$ LOG_DIR='../logs/'  # logging folder

# To start training 
$ python build.py --config-file ./config/effnet_coco.yaml  --num_gpus ${NUM_GPUS} --weights ${WEIGHTS} --output_dir ${LOG_DIR}