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
Empirical Study of Transformers for Source Code & A Simple Approach for Handling Out-of-Vocabulary Identifiers in Deep Learning for Source Code

Transformers for variable misuse, function naming and code completion tasks The official PyTorch implementation of: Empirical Study of Transformers fo

Bayesian Methods Research Group 56 Nov 15, 2022
Log4j JNDI inj. vuln scanner

Log-4-JAM - Log 4 Just Another Mess Log4j JNDI inj. vuln scanner Requirements pip3 install requests_toolbelt Usage # make sure target list has http/ht

Ashish Kunwar 66 Nov 09, 2022
Datasets, tools, and benchmarks for representation learning of code.

The CodeSearchNet challenge has been concluded We would like to thank all participants for their submissions and we hope that this challenge provided

GitHub 1.8k Dec 25, 2022
HiFi-GAN: High Fidelity Denoising and Dereverberation Based on Speech Deep Features in Adversarial Networks

HiFiGAN Denoiser This is a Unofficial Pytorch implementation of the paper HiFi-GAN: High Fidelity Denoising and Dereverberation Based on Speech Deep F

Rishikesh (ऋषिकेश) 134 Dec 27, 2022
A Python toolbox to create adversarial examples that fool neural networks in PyTorch, TensorFlow, and JAX

Foolbox Native: Fast adversarial attacks to benchmark the robustness of machine learning models in PyTorch, TensorFlow, and JAX Foolbox is a Python li

Bethge Lab 2.4k Dec 25, 2022
这是一个yolox-keras的源码,可以用于训练自己的模型。

YOLOX:You Only Look Once目标检测模型在Keras当中的实现 目录 性能情况 Performance 实现的内容 Achievement 所需环境 Environment 小技巧的设置 TricksSet 文件下载 Download 训练步骤 How2train 预测步骤 Ho

Bubbliiiing 64 Nov 10, 2022
Official code repository for the publication "Latent Equilibrium: A unified learning theory for arbitrarily fast computation with arbitrarily slow neurons"

Latent Equilibrium: A unified learning theory for arbitrarily fast computation with arbitrarily slow neurons This repository contains the code to repr

Computational Neuroscience, University of Bern 3 Aug 04, 2022
PyTorch Implementation of Unsupervised Depth Completion with Calibrated Backprojection Layers (ORAL, ICCV 2021)

Unsupervised Depth Completion with Calibrated Backprojection Layers PyTorch implementation of Unsupervised Depth Completion with Calibrated Backprojec

80 Dec 13, 2022
To SMOTE, or not to SMOTE?

To SMOTE, or not to SMOTE? This package includes the code required to repeat the experiments in the paper and to analyze the results. To SMOTE, or not

Amazon Web Services 1 Jan 03, 2022
Pytorch and Torch testing code of CartoonGAN

CartoonGAN-Test-Pytorch-Torch Pytorch and Torch testing code of CartoonGAN [Chen et al., CVPR18]. With the released pretrained models by the authors,

Yijun Li 642 Dec 27, 2022
McGill Physics Hackathon 2021: Reaction-Diffusion Models for the Generation of Biological Patterns

DiffuseAnimals: Reaction-Diffusion Models for the Generation of Biological Patterns Introduction Reaction-diffusion equations can be utilized in order

Austin Szuminsky 2 Mar 07, 2022
Xi Dongbo 78 Nov 29, 2022
Pytorch implementation of Learning Rate Dropout.

Learning-Rate-Dropout Pytorch implementation of Learning Rate Dropout. Paper Link: https://arxiv.org/pdf/1912.00144.pdf Train ResNet-34 for Cifar10: r

42 Nov 25, 2022
A Genetic Programming platform for Python with TensorFlow for wicked-fast CPU and GPU support.

Karoo GP Karoo GP is an evolutionary algorithm, a genetic programming application suite written in Python which supports both symbolic regression and

Kai Staats 149 Jan 09, 2023
Deep Learning for 3D Point Clouds: A Survey (IEEE TPAMI, 2020)

🔥Deep Learning for 3D Point Clouds (IEEE TPAMI, 2020)

Qingyong 1.4k Jan 08, 2023
PyTorch implementation of CDistNet: Perceiving Multi-Domain Character Distance for Robust Text Recognition

PyTorch implementation of CDistNet: Perceiving Multi-Domain Character Distance for Robust Text Recognition The unofficial code of CDistNet. Now, we ha

25 Jul 20, 2022
Official code for "Mean Shift for Self-Supervised Learning"

MSF Official code for "Mean Shift for Self-Supervised Learning" Requirements Python = 3.7.6 PyTorch = 1.4 torchvision = 0.5.0 faiss-gpu = 1.6.1 In

UMBC Vision 44 Nov 21, 2022
A deep learning object detector framework written in Python for supporting Land Search and Rescue Missions.

AIR: Aerial Inspection RetinaNet for supporting Land Search and Rescue Missions AIR is a deep learning based object detection solution to automate the

Accenture 13 Dec 22, 2022
Code for the paper "Ordered Neurons: Integrating Tree Structures into Recurrent Neural Networks"

ON-LSTM This repository contains the code used for word-level language model and unsupervised parsing experiments in Ordered Neurons: Integrating Tree

Yikang Shen 572 Nov 21, 2022
Implementation of ConvMixer-Patches Are All You Need? in TensorFlow and Keras

Patches Are All You Need? - ConvMixer ConvMixer, an extremely simple model that is similar in spirit to the ViT and the even-more-basic MLP-Mixer in t

Sayan Nath 8 Oct 03, 2022