Focal Loss for Dense Rotation Object Detection

Related tags

Deep Learninggluon2TF
Overview

Convert ResNets weights from GluonCV to Tensorflow

Abstract

GluonCV released some new resnet pre-training weights and designed some new resnets (such as resnet_v1_b, resnet_v1_d, refer this for detail).

This project reproduces the resnet in glouncv by Tensorflow and attempts to convert the pre-training weights in glouncv to the Tensorflow CheckPoints. At present, we have completed the conversion of resnet50_v1_b, resnet101_v1_b, resnet50_v1_d, resnet101_v1_d, and the 1000-dimensional Logits error rate is controlled within the range of 1e-5. (We welcome you to submit PR to support more models.)

We also try to transfer these weights to object detection (using FPN as the baseline, the specific detection code we will post here.), and train on voc07trainVal (excluding voc2012 dataset), test in voc07test. The results are as follows:

Comparison

use_voc2007_metric

Models mAP sheep horse bicycle bottle cow sofa bus dog cat person train diningtable aeroplane car pottedplant tvmonitor chair bird boat motorbike
Faster-RCNN resnet101_v1(original) 74.63 76.35 86.18 79.87 58.73 83.4 74.75 80.03 85.4 86.55 78.24 76.07 70.89 78.52 86.26 47.80 76.34 52.14 78.06 58.90 78.04
FPN resnet101_v1(original) 76.14 74.63 85.13 81.67 63.79 82.43 77.83 83.07 86.45 85.82 81.08 81.01 71.22 80.01 86.30 48.05 73.89 56.99 78.33 62.91 82.24
FPN resnet101_v1_d 77.98 78.01 87.48 85.34 65.42 84.56 74.42 82.97 87.87 87.34 82.14 84.44 70.32 80.64 88.6 51.9 76.59 59.31 81.19 67.84 83.1

FPN_resnet101_v1_d is transfer from GluonCV

FPN_resnet101_v1(original) is official resnet in tensorflow/models

My Development Environment

1、python2.7 (anaconda recommend)

2、cuda9.0

3、opencv(cv2)

4、mxnet-cu90 (1.3.0)

5、tensorflow == 1.10

6、GlounCV

Download MxNet GluonCV PreTrained Weights

cd $PATH_ROOT/resnet
(modify the resnet version in the main function of download_mxnet_resnet_weights.py.)
python download_mxnet_resnet_weights.py

Convert MxNet Weights To Tensorflow CheckPoint and caculate Erros

modify the main function in gluon2TF/resnet/test_resnet.py as following, and then run it

MODEL_NAME = 'resnet101_v1d' (modify the version as u want)
Mxnet_Weights_PATH = '../mxnet_weights/resnet101_v1d-1b2b825f.params' (remember modify the path)

cal_erro(img_path='../demo_img/person.jpg',
             use_tf_ckpt=False,
             ckpt_path='../tf_ckpts/%s.ckpt' % MODEL_NAME,
             save_ckpt=True)

Just run it :

cd $PATH_ROOT/resnet
python test_resnet

caculate Erros between the converted tensorflow chenckpoints and Mxnet GluonCV Weights

modify the main function in gluon2TF/resnet/test_resnet.py as following, and then run it

MODEL_NAME = 'resnet101_v1d' (modify the version as u want)
Mxnet_Weights_PATH = '../mxnet_weights/resnet101_v1d-1b2b825f.params' (remember modify the path)

cal_erro(img_path='../demo_img/person.jpg',
             use_tf_ckpt=True,
             ckpt_path='../tf_ckpts/%s.ckpt' % MODEL_NAME,
             save_ckpt=False)

Just run it :

cd $PATH_ROOT/resnet
python test_resnet
Get started with Machine Learning with Python - An introduction with Python programming examples

Machine Learning With Python Get started with Machine Learning with Python An engaging introduction to Machine Learning with Python TL;DR Download all

Learn Python with Rune 130 Jan 02, 2023
A Shading-Guided Generative Implicit Model for Shape-Accurate 3D-Aware Image Synthesis

A Shading-Guided Generative Implicit Model for Shape-Accurate 3D-Aware Image Synthesis Project Page | Paper A Shading-Guided Generative Implicit Model

Xingang Pan 115 Dec 18, 2022
git《FSCE: Few-Shot Object Detection via Contrastive Proposal Encoding》(CVPR 2021) GitHub: [fig8]

FSCE: Few-Shot Object Detection via Contrastive Proposal Encoding (CVPR 2021) This repo contains the implementation of our state-of-the-art fewshot ob

233 Dec 29, 2022
YOLOv7 - Framework Beyond Detection

🔥🔥🔥🔥 YOLO with Transformers and Instance Segmentation, with TensorRT acceleration! 🔥🔥🔥

JinTian 3k Jan 01, 2023
Hybrid CenterNet - Hybrid-supervised object detection / Weakly semi-supervised object detection

Hybrid-Supervised Object Detection System Object detection system trained by hybrid-supervision/weakly semi-supervision (HSOD/WSSOD): This project is

5 Dec 10, 2022
A script that trains a model to recognize handwritten digits using the MNIST data set.

handwritten-digits-recognition A script that trains a model to recognize handwritten digits using the MNIST data set. Then it loads external files and

Hamza Sayih 1 Oct 30, 2021
Wide Residual Networks (WideResNets) in PyTorch

Wide Residual Networks (WideResNets) in PyTorch WideResNets for CIFAR10/100 implemented in PyTorch. This implementation requires less GPU memory than

Jason Kuen 296 Dec 27, 2022
Cerberus Transformer: Joint Semantic, Affordance and Attribute Parsing

Cerberus Transformer: Joint Semantic, Affordance and Attribute Parsing Paper Introduction Multi-task indoor scene understanding is widely considered a

62 Dec 05, 2022
Awesome Transformers in Medical Imaging

This repo supplements our Survey on Transformers in Medical Imaging Fahad Shamshad, Salman Khan, Syed Waqas Zamir, Muhammad Haris Khan, Munawar Hayat,

Fahad Shamshad 666 Jan 06, 2023
Solution of Kaggle competition: Sartorius - Cell Instance Segmentation

Sartorius - Cell Instance Segmentation https://www.kaggle.com/c/sartorius-cell-instance-segmentation Environment setup Build docker image bash .dev_sc

68 Dec 09, 2022
Dataset and Source code of paper 'Enhancing Keyphrase Extraction from Academic Articles with their Reference Information'.

Enhancing Keyphrase Extraction from Academic Articles with their Reference Information Overview Dataset and code for paper "Enhancing Keyphrase Extrac

15 Nov 24, 2022
Aerial Single-View Depth Completion with Image-Guided Uncertainty Estimation (RA-L/ICRA 2020)

Aerial Depth Completion This work is described in the letter "Aerial Single-View Depth Completion with Image-Guided Uncertainty Estimation", by Lucas

ETHZ V4RL 70 Dec 22, 2022
HyperLib: Deep learning in the Hyperbolic space

HyperLib: Deep learning in the Hyperbolic space Background This library implements common Neural Network components in the hypberbolic space (using th

105 Dec 25, 2022
[ECCV'20] Convolutional Occupancy Networks

Convolutional Occupancy Networks Paper | Supplementary | Video | Teaser Video | Project Page | Blog Post This repository contains the implementation o

622 Dec 30, 2022
In-Place Activated BatchNorm for Memory-Optimized Training of DNNs

In-Place Activated BatchNorm In-Place Activated BatchNorm for Memory-Optimized Training of DNNs In-Place Activated BatchNorm (InPlace-ABN) is a novel

1.3k Dec 29, 2022
NOMAD - A blackbox optimization software

################################################################################### #

Blackbox Optimization 78 Dec 29, 2022
Processed, version controlled history of Minecraft's generated data and assets

mcmeta Processed, version controlled history of Minecraft's generated data and assets Repository structure Each of the following branches has a commit

Misode 75 Dec 28, 2022
Official implementations of PSENet, PAN and PAN++.

News (2021/11/03) Paddle implementation of PAN, see Paddle-PANet. Thanks @simplify23. (2021/04/08) PSENet and PAN are included in MMOCR. Introduction

395 Dec 14, 2022
Numerical differential equation solvers in JAX. Autodifferentiable and GPU-capable.

Diffrax Numerical differential equation solvers in JAX. Autodifferentiable and GPU-capable. Diffrax is a JAX-based library providing numerical differe

Patrick Kidger 717 Jan 09, 2023
xitorch: differentiable scientific computing library

xitorch is a PyTorch-based library of differentiable functions and functionals that can be widely used in scientific computing applications as well as deep learning.

24 Apr 15, 2021