SCALoss: Side and Corner Aligned Loss for Bounding Box Regression (AAAI2022).

Related tags

Deep LearningSCALoss
Overview

SCALoss

PyTorch implementation of the paper "SCALoss: Side and Corner Aligned Loss for Bounding Box Regression" (AAAI 2022).

Introduction

corner_center_comp

  • IoU-based loss has the gradient vanish problem in the case of low overlapping bounding boxes with slow convergence speed.
  • Side Overlap can put more penalty for low overlapping bounding box cases and Corner Distance can speed up the convergence.
  • SCALoss, which combines Side Overlap and Corner Distance, can serve as a comprehensive similarity measure, leading to better localization performance and faster convergence speed.

Prerequisites

Install

Conda is not necessary for the installation. Nevertheless, the installation process here is described using it.

$ conda create -n sca-yolo python=3.8 -y
$ conda activate sca-yolo
$ git clone https://github.com/Turoad/SCALoss
$ cd SCALoss
$ pip install -r requirements.txt

Getting started

Train a model:

python train.py --data [dataset config] --cfg [model config] --weights [path of pretrain weights] --batch-size [batch size num]

For example, to train yolov3-tiny on COCO dataset from scratch with batch size=128.

python train.py --data coco.yaml --cfg yolov3-tiny.yaml --weights '' --batch-size 128

For multi-gpu training, it is recommended to use:

python -m torch.distributed.launch --nproc_per_node 4 train.py --img 640 --batch 32 --epochs 300 --data coco.yaml --weights '' --cfg yolov3.yaml --device 0,1,2,3

Test a model:

python val.py --data coco.yaml --weights runs/train/exp15/weights/last.pt --img 640 --iou-thres=0.65

Results and Checkpoints

YOLOv3-tiny

Model mAP
0.5:0.95
AP
0.5
AP
0.65
AP
0.75
AP
0.8
AP
0.9
IoU 18.8 36.2 27.2 17.3 11.6 1.9
GIoU
relative improv.(%)
18.8
0%
36.2
0%
27.1
-0.37%
17.6
1.73%
11.8
1.72%
2.1
10.53%
DIoU
relative improv.(%)
18.8
0%
36.4
0.55%
26.9
-1.1%
17.2
-0.58%
11.8
1.72%
1.9
0%
CIoU
relative improv.(%)
18.9
0.53%
36.6
1.1%
27.3
0.37%
17.2
-0.58%
11.6
0%
2.1
10.53%
SCA
relative improv.(%)
19.9
5.85%
36.6
1.1%
28.3
4.04%
19.1
10.4%
13.3
14.66%
2.7
42.11%

The convergence curves of different losses on YOLOV3-tiny: converge curve

YOLOv3

Model mAP
0.5:0.95
AP
0.5
AP
0.65
AP
0.75
AP
0.8
AP
0.9
IoU 44.8 64.2 57.5 48.8 41.8 20.7
GIoU
relative improv.(%)
44.7
-0.22%
64.4
0.31%
57.5
0%
48.5
-0.61%
42
0.48%
20.4
-1.45%
DIoU
relative improv.(%)
44.7
-0.22%
64.3
0.16%
57.5
0%
48.9
0.2%
42.1
0.72%
19.8
-4.35%
CIoU
relative improv.(%)
44.7
-0.22%
64.3
0.16%
57.5
0%
48.9
0.2%
41.7
-0.24%
19.8
-4.35%
SCA
relative improv.(%)
45.3
1.12%
64.1
-0.16%
57.9
0.7%
49.9
2.25%
43.3
3.59%
21.4
3.38%

YOLOV5s

comming soon

Citation

If our paper and code are beneficial to your work, please consider citing:

@inproceedings{zheng2022scaloss,
  title={SCALoss: Side and Corner Aligned Loss for Bounding Box Regression},
  author={Zheng, Tu and Zhao, Shuai and Liu, Yang and Liu, Zili and Cai, Deng},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2022}
}

Acknowledgement

The code is modified from ultralytics/yolov3.

You might also like...
An implementation for the loss function proposed in Decoupled Contrastive Loss paper.

Decoupled-Contrastive-Learning This repository is an implementation for the loss function proposed in Decoupled Contrastive Loss paper. Requirements P

Implement of "Training deep neural networks via direct loss minimization" in PyTorch for 0-1 loss

This is the implementation of "Training deep neural networks via direct loss minimization" published at ICML 2016 in PyTorch. The implementation targe

Official PyTorch implementation of
Official PyTorch implementation of "Contrastive Learning from Extremely Augmented Skeleton Sequences for Self-supervised Action Recognition" in AAAI2022.

AimCLR This is an official PyTorch implementation of "Contrastive Learning from Extremely Augmented Skeleton Sequences for Self-supervised Action Reco

CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes (AAAI2022)
CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes (AAAI2022)

CMUA-Watermark The official code for CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes (AAAI2022) arxiv. It is bas

Repository for
Repository for "Improving evidential deep learning via multi-task learning," published in AAAI2022

Improving evidential deep learning via multi task learning It is a repository of AAAI2022 paper, “Improving evidential deep learning via multi-task le

Multi-Scale Aligned Distillation for Low-Resolution Detection (CVPR2021)
Multi-Scale Aligned Distillation for Low-Resolution Detection (CVPR2021)

MSAD Multi-Scale Aligned Distillation for Low-Resolution Detection Lu Qi*, Jason Kuen*, Jiuxiang Gu, Zhe Lin, Yi Wang, Yukang Chen, Yanwei Li, Jiaya J

Code repository for paper `Skeleton Merger: an Unsupervised Aligned Keypoint Detector`.
Code repository for paper `Skeleton Merger: an Unsupervised Aligned Keypoint Detector`.

Skeleton Merger Skeleton Merger, an Unsupervised Aligned Keypoint Detector. The paper is available at https://arxiv.org/abs/2103.10814. A map of the r

Multi-Scale Aligned Distillation for Low-Resolution Detection (CVPR2021)
Multi-Scale Aligned Distillation for Low-Resolution Detection (CVPR2021)

MSAD Multi-Scale Aligned Distillation for Low-Resolution Detection Lu Qi*, Jason Kuen*, Jiuxiang Gu, Zhe Lin, Yi Wang, Yukang Chen, Yanwei Li, Jiaya J

Learning RAW-to-sRGB Mappings with Inaccurately Aligned Supervision (ICCV 2021)
Learning RAW-to-sRGB Mappings with Inaccurately Aligned Supervision (ICCV 2021)

Learning RAW-to-sRGB Mappings with Inaccurately Aligned Supervision (ICCV 2021) PyTorch implementation of Learning RAW-to-sRGB Mappings with Inaccurat

Owner
TuZheng
TuZheng
Extending JAX with custom C++ and CUDA code

Extending JAX with custom C++ and CUDA code This repository is meant as a tutorial demonstrating the infrastructure required to provide custom ops in

Dan Foreman-Mackey 237 Dec 23, 2022
Creating a custom CNN hypertunned architeture for the Fashion MNIST dataset with Python, Keras and Tensorflow.

custom-cnn-fashion-mnist Creating a custom CNN hypertunned architeture for the Fashion MNIST dataset with Python, Keras and Tensorflow. The following

Danielle Almeida 1 Mar 05, 2022
A Fast and Accurate One-Stage Approach to Visual Grounding, ICCV 2019 (Oral)

One-Stage Visual Grounding ***** New: Our recent work on One-stage VG is available at ReSC.***** A Fast and Accurate One-Stage Approach to Visual Grou

Zhengyuan Yang 118 Dec 05, 2022
[CVPR2022] Representation Compensation Networks for Continual Semantic Segmentation

RCIL [CVPR2022] Representation Compensation Networks for Continual Semantic Segmentation Chang-Bin Zhang1, Jia-Wen Xiao1, Xialei Liu1, Ying-Cong Chen2

Chang-Bin Zhang 71 Dec 28, 2022
Efficient Online Bayesian Inference for Neural Bandits

Efficient Online Bayesian Inference for Neural Bandits By Gerardo Durán-Martín, Aleyna Kara, and Kevin Murphy AISTATS 2022.

Probabilistic machine learning 49 Dec 27, 2022
This folder contains the implementation of the multi-relational attribute propagation algorithm.

MrAP This folder contains the implementation of the multi-relational attribute propagation algorithm. It requires the package pytorch-scatter. Please

6 Dec 06, 2022
Deep Learning Visuals contains 215 unique images divided in 23 categories

Deep Learning Visuals contains 215 unique images divided in 23 categories (some images may appear in more than one category). All the images were originally published in my book "Deep Learning with P

Daniel Voigt Godoy 1.3k Dec 28, 2022
for a paper about leveraging discourse markers for training new models

TSLM-DISCOURSE-MARKERS Scope This repository contains: (1) Code to extract discourse markers from wikipedia (TSA). (1) Code to extract significant dis

International Business Machines 6 Nov 02, 2022
A naive ROS interface for visualDet3D.

YOLO3D ROS Node This repo contains a Monocular 3D detection Ros node. Base on https://github.com/Owen-Liuyuxuan/visualDet3D All parameters are exposed

Yuxuan Liu 19 Oct 08, 2022
Code for our paper Aspect Sentiment Quad Prediction as Paraphrase Generation in EMNLP 2021.

Aspect Sentiment Quad Prediction (ASQP) This repo contains the annotated data and code for our paper Aspect Sentiment Quad Prediction as Paraphrase Ge

Isaac 39 Dec 11, 2022
Stochastic Normalizing Flows

Stochastic Normalizing Flows We introduce stochasticity in Boltzmann-generating flows. Normalizing flows are exact-probability generative models that

AI4Science group, FU Berlin (Frank Noé and co-workers) 50 Dec 16, 2022
Simulation-based inference for the Galactic Center Excess

Simulation-based inference for the Galactic Center Excess Siddharth Mishra-Sharma and Kyle Cranmer Abstract The nature of the Fermi gamma-ray Galactic

Siddharth Mishra-Sharma 3 Jan 21, 2022
Establishing Strong Baselines for TripClick Health Retrieval; ECIR 2022

TripClick Baselines with Improved Training Data Welcome 🙌 to the hub-repo of our paper: Establishing Strong Baselines for TripClick Health Retrieval

Sebastian Hofstätter 3 Nov 03, 2022
Info and sample codes for "NTU RGB+D Action Recognition Dataset"

"NTU RGB+D" Action Recognition Dataset "NTU RGB+D 120" Action Recognition Dataset "NTU RGB+D" is a large-scale dataset for human action recognition. I

Amir Shahroudy 578 Dec 30, 2022
PyTorch image models, scripts, pretrained weights -- ResNet, ResNeXT, EfficientNet, EfficientNetV2, NFNet, Vision Transformer, MixNet, MobileNet-V3/V2, RegNet, DPN, CSPNet, and more

PyTorch Image Models Sponsors What's New Introduction Models Features Results Getting Started (Documentation) Train, Validation, Inference Scripts Awe

Ross Wightman 22.9k Jan 09, 2023
A scanpy extension to analyse single-cell TCR and BCR data.

Scirpy: A Scanpy extension for analyzing single-cell immune-cell receptor sequencing data Scirpy is a scalable python-toolkit to analyse T cell recept

ICBI 145 Jan 03, 2023
This repo holds codes of the ICCV21 paper: Visual Alignment Constraint for Continuous Sign Language Recognition.

VAC_CSLR This repo holds codes of the paper: Visual Alignment Constraint for Continuous Sign Language Recognition.(ICCV 2021) [paper] Prerequisites Th

Yuecong Min 64 Dec 19, 2022
Pytorch implementation of the popular Improv RNN model originally proposed by the Magenta team.

Pytorch Implementation of Improv RNN Overview This code is a pytorch implementation of the popular Improv RNN model originally implemented by the Mage

Sebastian Murgul 3 Nov 11, 2022
Caffe: a fast open framework for deep learning.

Caffe Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by Berkeley AI Research (BAIR)/The Berke

Berkeley Vision and Learning Center 33k Dec 28, 2022
DeepFaceLab fork which provides IPython Notebook to use DFL with Google Colab

DFL-Colab — DeepFaceLab fork for Google Colab This project provides you IPython Notebook to use DeepFaceLab with Google Colaboratory. You can create y

779 Jan 05, 2023