reimpliment of DFANet: Deep Feature Aggregation for Real-Time Semantic Segmentation

Related tags

Deep Learning DFANet
Overview

DFANet

This repo is an unofficial pytorch implementation of DFANet:Deep Feature Aggregation for Real-Time Semantic Segmentation

log

  • 2019.4.16 After 483 epoches it rases RuntimeError: value cannot be converted to type float without overflow: (9.85073e-06,-3.2007e-06).According to the direction of the stackoverflow the error can be fixed by modifying "self.scheduler.step()" to "self.scheduler.step(loss.cpu().data.numpy())" in train.py.

  • 2019.4.24 An function has been writed to load the pretrained model which was trained on imagenet-1k.The project of training the backbone can be Downloaded from here -https://github.com/huaifeng1993/ILSVRC2012. Limited to my computing resources(only have one RTX2080),I trained the backbone on ILSVRC2012 with only 22 epochs.But it have a great impact on the results.

  • 2019.5.23 It's hard to improve the performance of the model.May be the model's details are different from the original paper's or the hyperparameters ....or the training strategy...or something else...

  • 2020.3.7 rewrited some code of this rep which make the code more modular(model/dfanet.py).

Installation

  • pytorch==1.0.0
  • python==3.6
  • numpy
  • torchvision
  • matplotlib
  • opencv-python
  • tensorflow
  • tensorboardX

Dataset and pretrained model

Download CityScape dataset and unzip the dataset into data folder.Then run the command 'python utils/preprocess_data.py' to create labels.

Train the network without pretrained model.

Modify your configuration in main.py.

run the command  'python main.py'

curvs on CityScape set

#

inference speed

platform input size batch size inference time /ms
rk3399 320*200 1 960
rk3399 200*100 1 589
rk3399 80*80 1 259
rk3399 72*72 1 161
2080 1024*1024 4 40
2080 1024*1024 1 16
2080 2048*1024 1 17
2080 2048*1024 2 39
2080 512*512 1 39
2080 512*512 16 44

Some experimental results was provided by @ShaoqingGong

To do

  • Train the backbone xceptionA on the ImageNet-1k.

  • Modify the network and improve the accuracy.

  • Debug and report the performance.

  • Schedule the lr

  • ...

Thanks

Comments
  • I can not train

    I can not train

    I change main.py net = dfanet(pretrained=True,num_classes=20) to net = dfanet(pretrained=False,num_classes=20) and run.

    (DFANet) sounnansu@ubuntu2:~/anaconda3/DFANet$ python main.py
    ./log/dfanet20190805T1416
    Traceback (most recent call last):
      File "main.py", line 44, in <module>
        trainer.load_weights(trainer.find_last())
      File "/home/sounansu/anaconda3/DFANet/train.py", line 185, in find_last
        "Could not find weight files in {}".format(dir_name))
    FileNotFoundError: [Errno 2] Could not find weight files in  ./log/dfanet20190805T1416
    
    opened by sounansu 3
  • DataAugment_random crop size

    DataAugment_random crop size

    hello, while i'm reading the cityscape.py, i found your random crop size is (512, 512), while the paper is (1024, 1024). Is this due to conflicts with the scale range (0.75, 1.75), so you change it to (512, 512)?

    opened by zhujing210 0
  • 训练问题请教

    训练问题请教

    @你好, 执行python @@main.py时提示: Traceback (most recent call last): File "main.py", line 40, in trainer.load_weights(trainer.find_last()) File "/home/passwd123123/zyx/DFANet/train.py", line 189, in find_last "Could not find weight files in {}".format(dir_name)) FileNotFoundError: [Errno 2] Could not find weight files in ./log/dfanet20191211T1533

    然后去看提示中的train.py文件最后发现是下面的checkpoint为空导致的: # Find the last checkpoint checkpoints = next(os.walk(dir_name))[2] checkpoints = filter(lambda f: f.startswith("model"), checkpoints) checkpoints = sorted(checkpoints) if not checkpoints: 不知道这个checkpoints有什么用,是先要手动往./log/dfanet20191211T1533目录存放model文件吗?

    opened by zhangyuanxue 0
  • DataAugment_random crop size

    DataAugment_random crop size

    hello, while i'm reading the cityscape.py, i found your random crop size is (512, 512), while the paper is (1024, 1024). Is this due to conflicts with the scale range (0.75, 1.75), so you change it to (512, 512)?

    opened by zhujing210 0
  • The mIOU haven't improved

    The mIOU haven't improved

    Hi @huaifeng1993 Good job! I train the code in my dataset but the mIOU of train and val haven't improved when trainning step by step! Do you any ideas?

    opened by gaowq2017 1
Owner
shen hui xiang
shen hui xiang
Official repository for the CVPR 2021 paper "Learning Feature Aggregation for Deep 3D Morphable Models"

Deep3DMM Official repository for the CVPR 2021 paper Learning Feature Aggregation for Deep 3D Morphable Models. Requirements This code is tested on Py

null 38 Dec 27, 2022
The implementation of the paper "A Deep Feature Aggregation Network for Accurate Indoor Camera Localization".

A Deep Feature Aggregation Network for Accurate Indoor Camera Localization This is the PyTorch implementation of our paper "A Deep Feature Aggregation

null 9 Dec 9, 2022
Real-Time-Student-Attendence-System - Real Time Student Attendence System

Real-Time-Student-Attendence-System The Student Attendance Management System Pro

Rounak Das 1 Feb 15, 2022
HyperSeg: Patch-wise Hypernetwork for Real-time Semantic Segmentation Official PyTorch Implementation

: We present a novel, real-time, semantic segmentation network in which the encoder both encodes and generates the parameters (weights) of the decoder. Furthermore, to allow maximal adaptivity, the weights at each decoder block vary spatially. For this purpose, we design a new type of hypernetwork, composed of a nested U-Net for drawing higher level context features

Yuval Nirkin 182 Dec 14, 2022
FANet - Real-time Semantic Segmentation with Fast Attention

FANet Real-time Semantic Segmentation with Fast Attention Ping Hu, Federico Perazzi, Fabian Caba Heilbron, Oliver Wang, Zhe Lin, Kate Saenko , Stan Sc

Ping Hu 42 Nov 30, 2022
A pytorch reproduction of { Co-occurrence Feature Learning from Skeleton Data for Action Recognition and Detection with Hierarchical Aggregation }.

A PyTorch Reproduction of HCN Co-occurrence Feature Learning from Skeleton Data for Action Recognition and Detection with Hierarchical Aggregation. Ch

Guyue Hu 210 Dec 31, 2022
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

null 32 Sep 21, 2022
CSAC - Collaborative Semantic Aggregation and Calibration for Separated Domain Generalization

CSAC Introduction This repository contains the implementation code for paper: Co

ScottYuan 5 Jul 22, 2022
RTS3D: Real-time Stereo 3D Detection from 4D Feature-Consistency Embedding Space for Autonomous Driving

RTS3D: Real-time Stereo 3D Detection from 4D Feature-Consistency Embedding Space for Autonomous Driving (AAAI2021). RTS3D is efficiency and accuracy s

null 71 Nov 29, 2022
Semantic Segmentation for Real Point Cloud Scenes via Bilateral Augmentation and Adaptive Fusion (CVPR 2021)

Semantic Segmentation for Real Point Cloud Scenes via Bilateral Augmentation and Adaptive Fusion (CVPR 2021) This repository is for BAAF-Net introduce

null 90 Dec 29, 2022
Learning Pixel-level Semantic Affinity with Image-level Supervision for Weakly Supervised Semantic Segmentation, CVPR 2018

Learning Pixel-level Semantic Affinity with Image-level Supervision This code is deprecated. Please see https://github.com/jiwoon-ahn/irn instead. Int

Jiwoon Ahn 337 Dec 15, 2022
Time-series-deep-learning - Developing Deep learning LSTM, BiLSTM models, and NeuralProphet for multi-step time-series forecasting of stock price.

Stock Price Prediction Using Deep Learning Univariate Time Series Predicting stock price using historical data of a company using Neural networks for

Abdultawwab Safarji 7 Nov 27, 2022
YolactEdge: Real-time Instance Segmentation on the Edge

YolactEdge, the first competitive instance segmentation approach that runs on small edge devices at real-time speeds. Specifically, YolactEdge runs at up to 30.8 FPS on a Jetson AGX Xavier (and 172.7 FPS on an RTX 2080 Ti) with a ResNet-101 backbone on 550x550 resolution images.

Haotian Liu 1.1k Jan 6, 2023
OrienMask: Real-time Instance Segmentation with Discriminative Orientation Maps

OrienMask This repository implements the framework OrienMask for real-time instance segmentation. It achieves 34.8 mask AP on COCO test-dev at the spe

null 45 Dec 13, 2022
implement of SwiftNet:Real-time Video Object Segmentation

SwiftNet The official PyTorch implementation of SwiftNet:Real-time Video Object Segmentation, which has been accepted by CVPR2021. Requirements Python

haochen wang 64 Dec 14, 2022
A keras-based real-time model for medical image segmentation (CFPNet-M)

CFPNet-M: A Light-Weight Encoder-Decoder Based Network for Multimodal Biomedical Image Real-Time Segmentation This repository contains the implementat

null 268 Nov 27, 2022
A lane detection integrated Real-time Instance Segmentation based on YOLACT (You Only Look At CoefficienTs)

Real-time Instance Segmentation and Lane Detection This is a lane detection integrated Real-time Instance Segmentation based on YOLACT (You Only Look

Jin 4 Dec 30, 2022
TCNN Temporal convolutional neural network for real-time speech enhancement in the time domain

TCNN Pandey A, Wang D L. TCNN: Temporal convolutional neural network for real-time speech enhancement in the time domain[C]//ICASSP 2019-2019 IEEE Int

凌逆战 16 Dec 30, 2022
Models Supported: AlbUNet [18, 34, 50, 101, 152] (1D and 2D versions for Single and Multiclass Segmentation, Feature Extraction with supports for Deep Supervision and Guided Attention)

AlbUNet-1D-2D-Tensorflow-Keras This repository contains 1D and 2D Signal Segmentation Model Builder for AlbUNet and several of its variants developed

Sakib Mahmud 1 Nov 15, 2021