EPSANet:An Efficient Pyramid Split Attention Block on Convolutional Neural Network

Overview

EPSANet:An Efficient Pyramid Split Attention Block on Convolutional Neural Network

This repo contains the official Pytorch implementaion code and configuration files of EPSANet:An Efficient Pyramid Split Attention Block on Convolutional Neural Network. created by Hu Zhang.

Installation

Requirements

  • Python 3.6+
  • PyTorch 1.0+

Our environments

  • OS: Ubuntu 18.04
  • CUDA: 10.0
  • Toolkit: PyTorch 1.0
  • GPU: Titan RTX

Data preparation

Download and extract ImageNet train and val images from http://image-net.org/. The directory structure is the standard layout for the torchvision datasets.ImageFolder, and the training and validation data is expected to be in the train/ folder and val folder respectively:

/path/to/imagenet/
  train/
    class1/
      img1.jpeg
    class2/
      img2.jpeg
  val/
    class1/
      img3.jpeg
    class/2
      img4.jpeg

Usage

First, clone the repository locally:

git clone https://github.com/murufeng/EPSANet.git
cd EPSANet
  • Create a conda virtual environment and activate it:
conda create -n epsanet python=3.6 
conda activate epsanet
conda install -c pytorch pytorch torchvision

Training

To train models on ImageNet with 8 gpus run:

CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python main.py -a epsanet50 --data /path/to/imagenet 

Model Zoo

Models are trained with 8 GPUs on both ImageNet and MS-COCO 2017 dataset.

Image Classification on ImageNet

Model Params(M) FLOPs(G) Top-1 (%) Top-5 (%)
EPSANet-50(Small) 22.56 3.62 77.49 93.54
EPSANet-50(Large) 27.90 4.72 78.64 94.18
EPSANet-101(Small) 38.90 6.82 78.43 94.11
EPSANet-101(Large) 49.59 8.97 79.38 94.58

Object Detection on MS-COCO 2017

Faster R-CNN

model Style Lr schd Params(M) FLOPs(G) box AP AP_50 AP_75
EPSANet-50(small) pytorch 1x 38.56 197.07 39.2 60.3 42.3
EPSANet-50(large) pytorch 1x 43.85 219.64 40.9 62.1 44.6

Mask R-CNN

model Style Lr schd Params(M) FLOPs(G) box AP AP_50 AP_75
EPSANet-50(small) pytorch 1x 41.20 248.53 40.0 60.9 43.3
EPSANet-50(large) pytorch 1x 46.50 271.10 41.4 62.3 45.3

RetinaNet

model Style Lr schd Params(M) FLOPs(G) box AP AP_50 AP_75
EPSANet-50(small) pytorch 1x 34.78 229.32 38.2 58.1 40.6
EPSANet-50(large) pytorch 1x 40.07 251.89 39.6 59.4 42.3

Instance segmentation with Mask R-CNN on MS-COCO 2017

model Params(M) FLOPs(G) AP AP_50 AP_75
EPSANet-50(small) 41.20 248.53 35.9 57.7 38.1
EPSANet-50(Large) 46.50 271.10 37.1 59.0 39.5

Citing EPSANet

You can cite the paper as:

@article{hu2021epsanet,
  title={EPSANet:An Efficient Pyramid Split Attention Block on Convolutional Neural Network},
  author={Hu Zhang and Keke Zu and Jian Lu and Yuru Zou and Deyu Meng},
  journal={arXiv preprint arXiv:2105.14447},
  year={2021}
}
Convolutional Neural Network for 3D meshes in PyTorch

MeshCNN in PyTorch SIGGRAPH 2019 [Paper] [Project Page] MeshCNN is a general-purpose deep neural network for 3D triangular meshes, which can be used f

Rana Hanocka 1.4k Jan 04, 2023
Minimisation of a negative log likelihood fit to extract the lifetime of the D^0 meson (MNLL2ELDM)

Minimisation of a negative log likelihood fit to extract the lifetime of the D^0 meson (MNLL2ELDM) Introduction The average lifetime of the $D^{0}$ me

Son Gyo Jung 1 Dec 17, 2021
Augmentation for Single-Image-Super-Resolution

SRAugmentation Augmentation for Single-Image-Super-Resolution Implimentation CutBlur Cutout CutMix Cutup CutMixup Blend RGBPermutation Identity OneOf

Yubo 6 Jun 27, 2022
pytorch implementation for PointNet

PointNet.pytorch This repo is implementation for PointNet in pytorch. The model is in pointnet/model.py. It is teste

Fei Xia 1.7k Dec 30, 2022
MutualGuide is a compact object detector specially designed for embedded devices

Introduction MutualGuide is a compact object detector specially designed for embedded devices. Comparing to existing detectors, this repo contains two

ZHANG Heng 103 Dec 13, 2022
Project looking into use of autoencoder for semi-supervised learning and comparing data requirements compared to supervised learning.

Project looking into use of autoencoder for semi-supervised learning and comparing data requirements compared to supervised learning.

Tom-R.T.Kvalvaag 2 Dec 17, 2021
Pytorch implementation for our ICCV 2021 paper "TRAR: Routing the Attention Spans in Transformers for Visual Question Answering".

TRAnsformer Routing Networks (TRAR) This is an official implementation for ICCV 2021 paper "TRAR: Routing the Attention Spans in Transformers for Visu

Ren Tianhe 49 Nov 10, 2022
Self-Supervised Image Denoising via Iterative Data Refinement

Self-Supervised Image Denoising via Iterative Data Refinement Yi Zhang1, Dasong Li1, Ka Lung Law2, Xiaogang Wang1, Hongwei Qin2, Hongsheng Li1 1CUHK-S

Zhang Yi 72 Jan 01, 2023
A Broader Picture of Random-walk Based Graph Embedding

Random-walk Embedding Framework This repository is a reference implementation of the random-walk embedding framework as described in the paper: A Broa

Zexi Huang 23 Dec 13, 2022
Differential rendering based motion capture blender project.

TraceArmature Summary TraceArmature is currently a set of python scripts that allow for high fidelity motion capture through the use of AI pose estima

William Rodriguez 4 May 27, 2022
Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.

vid2vid Project | YouTube(short) | YouTube(full) | arXiv | Paper(full) Pytorch implementation for high-resolution (e.g., 2048x1024) photorealistic vid

NVIDIA Corporation 8.1k Jan 01, 2023
Implementation of Vaswani, Ashish, et al. "Attention is all you need."

Attention Is All You Need Paper Implementation This is my from-scratch implementation of the original transformer architecture from the following pape

Brando Koch 195 Dec 30, 2022
Code used to generate the results appearing in "Train longer, generalize better: closing the generalization gap in large batch training of neural networks"

Train longer, generalize better - Big batch training This is a code repository used to generate the results appearing in "Train longer, generalize bet

Elad Hoffer 145 Sep 16, 2022
PyTorch and Tensorflow functional model definitions

functional-zoo Model definitions and pretrained weights for PyTorch and Tensorflow PyTorch, unlike lua torch, has autograd in it's core, so using modu

Sergey Zagoruyko 590 Dec 22, 2022
Fast SHAP value computation for interpreting tree-based models

FastTreeSHAP FastTreeSHAP package is built based on the paper Fast TreeSHAP: Accelerating SHAP Value Computation for Trees published in NeurIPS 2021 X

LinkedIn 369 Jan 04, 2023
Dataset used in "PlantDoc: A Dataset for Visual Plant Disease Detection" accepted in CODS-COMAD 2020

PlantDoc: A Dataset for Visual Plant Disease Detection This repository contains the Cropped-PlantDoc dataset used for benchmarking classification mode

Pratik Kayal 109 Dec 29, 2022
Weakly Supervised Dense Event Captioning in Videos, i.e. generating multiple sentence descriptions for a video in a weakly-supervised manner.

WSDEC This is the official repo for our NeurIPS paper Weakly Supervised Dense Event Captioning in Videos. Description Repo directories ./: global conf

Melon(Xuguang Duan) 96 Nov 01, 2022
Implementation of the paper All Labels Are Not Created Equal: Enhancing Semi-supervision via Label Grouping and Co-training

SemCo The official pytorch implementation of the paper All Labels Are Not Created Equal: Enhancing Semi-supervision via Label Grouping and Co-training

42 Nov 14, 2022
Providing the solutions for high-frequency trading (HFT) strategies using data science approaches (Machine Learning) on Full Orderbook Tick Data.

Modeling High-Frequency Limit Order Book Dynamics Using Machine Learning Framework to capture the dynamics of high-frequency limit order books. Overvi

Chang-Shu Chung 1.3k Jan 07, 2023
Official release of MSHT: Multi-stage Hybrid Transformer for the ROSE Image Analysis of Pancreatic Cancer axriv: http://arxiv.org/abs/2112.13513

MSHT: Multi-stage Hybrid Transformer for the ROSE Image Analysis This is the official page of the MSHT with its experimental script and records. We de

Tianyi Zhang 53 Dec 27, 2022