iNAS: Integral NAS for Device-Aware Salient Object Detection

Related tags

Deep Learning iNAS
Overview

iNAS: Integral NAS for Device-Aware Salient Object Detection

Introduction

Integral search design (jointly consider backbone/head structures, design/deploy devices).


Covers mainstream handcraft saliency head design.

SOTA performance with large latency reduction on diverse hardware platforms.


Updates

0.1.0 was released in 15/11/2021:

  • Support training and searching on Salient Object Detection (SOD).
  • Support four stages in one-shot architecture search.
  • Support stand-alone model inference with json configuration.
  • Provide off-the-shelf models and experiment logs.

Please refer to changelog.md for details and release history.

Dependencies and Installation

Dependencies

Install from a local clone

  1. Clone the repo

    git clone https://github.com/guyuchao/iNAS.git
  2. Install dependent packages

    conda create -n iNAS python=3.8
    conda install -c pytorch pytorch=1.7 torchvision cudatoolkit=10.2
    pip install -r requirements.txt
  3. Install iNAS
    Please run the following commands in the iNAS root path to install iNAS:

    python setup.py develop

Dataset Preparation

Folder Structure

iNAS
├── iNAS
├── experiment
├── scripts
├── options
├── datasets
│   ├── saliency
│   │   ├── DUTS-TR/            # Contains both images (.jpg) and labels (.png).
│   │   ├── DUTS-TR.lst         # Specify the image-label pair for training or testing.
│   │   ├── ECSSD/
│   │   ├── ECSSD.lst
│   │   ├── ...

Common Image SOD Datasets

We provide a list of common salient object detection datasets.

Name Datasets Short Description Download
SOD Training DUTS-TR 10553 images for SOD training Google Drive / Baidu Drive (psd: w69q)
SOD Testing ECSSD 1000 images for SOD testing
DUT-OMRON 5168 images for SOD testing
DUTS-TE 5019 images for SOD testing
HKU-IS 4447 images for SOD testing
PASCAL-S 850 images for SOD testing

How to Use

The iNAS integrates four main steps of one-shot neural architecture search:

  • Train supernet: Provide a fast performance evaluator for searching.
  • Search models: Find a pareto frontier based on performance evaluator and resource evaluator.
  • Convert weight/Retrain/Finetune: Promote searched model performance to its best. (We now support converting supernet weight to stand-alone models without retraining.)
  • Deploy: Test stand-alone models.

Please see Tutorial.md for the basic usage of those steps in iNAS.

Model Zoo

Pre-trained models and log examples are available in ModelZoo.md.

TODO List

  • Support multi-processing search (simply use data-parallel cannot increase search speed).
  • Complete documentations.
  • Add some applications.

Citation

If you find this project useful in your research, please consider cite:

@inproceedings{gu2021inas,
  title={iNAS: Integral NAS for Device-Aware Salient Object Detection},
  author={Gu, Yu-Chao and Gao, Shang-Hua and Cao, Xu-Sheng and Du, Peng and Lu, Shao-Ping and Cheng, Ming-Ming},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={4934--4944},
  year={2021}
}

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (cc-by-nc-sa), where only non-commercial usage is allowed. For commercial usage, please contact us.

Acknowledgement

The project structure is borrowed from BasicSR, and parts of implementation and evaluation codes are borrowed from Once-For-All, BASNet and BiSeNet . Thanks for these excellent projects.

Contact

If you have any questions, please email [email protected].

Comments
  • an error occur

    an error occur

    torch.nn.modules.module.ModuleAttributeError: 'iNASSupernet' object has no attribute 'module'. This error when one epoch is trained and try to valid the supernet。I wonder if this is a bug? i use pytorch 1.7.1,seems to qualify.I am really looking forward for your help. And great work it is.

    opened by SuperDickHead 4
  • How to generate the pretrain supernet checkpoints

    How to generate the pretrain supernet checkpoints

    Hello again! I have noticed that you provided your pretrained checkpoints checkpoint-28b11d7f.pth. If i modify the search space,how can i get my checkpoints, and how can i pretrain it? Is the pretrain process including pretraining the supernet backbone on imagenet? Thank you!

    opened by SuperDickHead 2
  • !python iNAS/train.py -opt options/train/SOD/train_supernet_sod_4gpu_b10_e100_noaug.yml

    !python iNAS/train.py -opt options/train/SOD/train_supernet_sod_4gpu_b10_e100_noaug.yml

    你好, 图片

    Traceback (most recent call last): File "iNAS/train.py", line 246, in train_pipeline(root_path) File "iNAS/train.py", line 145, in train_pipeline model = build_model(opt) File "/output/iNAS/iNAS/models/init.py", line 27, in build_model model = MODEL_REGISTRY.get(opt['model_type'])(opt) File "/output/iNAS/iNAS/models/oneshot_model.py", line 40, in init self.load_network(self.supernet, load_path, self.opt['path'].get('strict_load', True), param_key) File "/output/iNAS/iNAS/models/base_model.py", line 245, in load_network load_net = load_net[param_key] KeyError: 'state_dict' 首先这两个文件权重一样吗, 其次 为什么会报这个错呢 按照你的log 文件来弄得

    opened by JcccKing 2
  • some bug about the searching space

    some bug about the searching space

    I have tried different search space, and i find that sometimes i can't search the kernel in backbone stage1 and stage2,(torch.nn.modules.module.ModuleAttributeError: 'SMSU' object has no attribute 'ks_5' )and the deeper stage kernel in backbone is searchable. And sometime i can seach the kernel in stage 1,2, I 'm running my first version and it support the kernel seach in backbone stage 1 and 2. I don't know if i express myself clearly,so i say it in Chinese again. 就是我发现搜索空间的cfg里backbone stage1,2有的时候我可以设置kernel 搜索[3,5,7,9],有的时候我只能设置[3]它才不会报错, (torch.nn.modules.module.ModuleAttributeError: 'SMSU' object has no attribute 'ks_5' ),我的第一版搜索只搜索了骨干,之后每个stage的kernel我都可以自由的搜索,第二版我加入了transport的搜索空间,然后导致了我backbone的stage1和2的kernel不能搜了别的都没问题,请问是什么原因呢。

    opened by SuperDickHead 1
  • About BN finetune

    About BN finetune

    Hello! I've transfer your great work to other task,and I find the bn_finetuning process is super time consuming ,especially during the searching process(one 3080Ti), since each candidate need to get bn finetune(i set batchsize 32,iter 100) before validation. Is this process really nessesary? Is it beacause the weight comes from the supernet so the parameter in BN is chaotic makes it needs to finetune? I 'm a rookie in NAS, thank you!

    opened by SuperDickHead 0
  • teacher_pred not detach

    teacher_pred not detach

    Hello big brother Gu,it's been a while. I have read some old paper these days. And i find that in the 《Universally slimmable Networks 》----(seems to be the first paper present the sandwich rule and inplace distillation,I thought it was bignas,but it wasn't).It detach the teacher_pred for further distillation since it seems to be able to save a lot of memory in GPU. And you emphasized not detach in oneshot_model.py. I wonder why. And,Thank you for your work, I have learned a lot.

    opened by SuperDickHead 0
Owner
顾宇超
Postgraduate at Nankai University.
顾宇超
U2-Net: Going Deeper with Nested U-Structure for Salient Object Detection

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."

Xuebin Qin 6.5k Jan 9, 2023
The official repo of the CVPR 2021 paper Group Collaborative Learning for Co-Salient Object Detection .

GCoNet The official repo of the CVPR 2021 paper Group Collaborative Learning for Co-Salient Object Detection . Trained model Download final_gconet.pth

Qi Fan 46 Nov 17, 2022
Code for ACM MM2021 paper "Complementary Trilateral Decoder for Fast and Accurate Salient Object Detection"

CTDNet The PyTorch code for ACM MM2021 paper "Complementary Trilateral Decoder for Fast and Accurate Salient Object Detection" Requirements Python 3.6

CVTEAM 28 Oct 20, 2022
Code for the TIP 2021 Paper "Salient Object Detection with Purificatory Mechanism and Structural Similarity Loss"

PurNet Project for the TIP 2021 Paper "Salient Object Detection with Purificatory Mechanism and Structural Similarity Loss" Abstract Image-based salie

Jinming Su 4 Aug 25, 2022
Official implementation of "Can You Spot the Chameleon? Adversarially Camouflaging Images from Co-Salient Object Detection" in CVPR 2022.

Jadena Official implementation of "Can You Spot the Chameleon? Adversarially Camouflaging Images from Co-Salient Object Detection" in CVPR 2022. arXiv

Qing Guo 13 Nov 29, 2022
[ICLR 2021] HW-NAS-Bench: Hardware-Aware Neural Architecture Search Benchmark

HW-NAS-Bench: Hardware-Aware Neural Architecture Search Benchmark Accepted as a spotlight paper at ICLR 2021. Table of content File structure Prerequi

null 72 Jan 3, 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

null 5 Dec 10, 2022
Yolo object detection - Yolo object detection with python

How to run download required files make build_image make download Docker versio

null 3 Jan 26, 2022
Symmetry and Uncertainty-Aware Object SLAM for 6DoF Object Pose Estimation

SUO-SLAM This repository hosts the code for our CVPR 2022 paper "Symmetry and Uncertainty-Aware Object SLAM for 6DoF Object Pose Estimation". ArXiv li

Robot Perception & Navigation Group (RPNG) 97 Jan 3, 2023
(IEEE TIP 2021) Regularized Densely-connected Pyramid Network for Salient Instance Segmentation

RDPNet IEEE TIP 2021: Regularized Densely-connected Pyramid Network for Salient Instance Segmentation PyTorch training and testing code are available.

Yu-Huan Wu 41 Oct 21, 2022
Code for CVPR2021 paper "Learning Salient Boundary Feature for Anchor-free Temporal Action Localization"

AFSD: Learning Salient Boundary Feature for Anchor-free Temporal Action Localization This is an official implementation in PyTorch of AFSD. Our paper

Tencent YouTu Research 146 Dec 24, 2022
How to Become More Salient? Surfacing Representation Biases of the Saliency Prediction Model

How to Become More Salient? Surfacing Representation Biases of the Saliency Prediction Model

Bogdan Kulynych 49 Nov 5, 2022
CCAFNet: Crossflow and Cross-scale Adaptive Fusion Network for Detecting Salient Objects in RGB-D Images

Code and result about CCAFNet(IEEE TMM) 'CCAFNet: Crossflow and Cross-scale Adaptive Fusion Network for Detecting Salient Objects in RGB-D Images' IEE

zyrant丶 14 Dec 29, 2021
Official Repo for Ground-aware Monocular 3D Object Detection for Autonomous Driving

Visual 3D Detection Package: This repo aims to provide flexible and reproducible visual 3D detection on KITTI dataset. We expect scripts starting from

Yuxuan Liu 305 Dec 19, 2022
Scale-aware Automatic Augmentation for Object Detection (CVPR 2021)

SA-AutoAug Scale-aware Automatic Augmentation for Object Detection Yukang Chen, Yanwei Li, Tao Kong, Lu Qi, Ruihang Chu, Lei Li, Jiaya Jia [Paper] [Bi

DV Lab 182 Dec 29, 2022
Part-Aware Data Augmentation for 3D Object Detection in Point Cloud

Part-Aware Data Augmentation for 3D Object Detection in Point Cloud This repository contains a reference implementation of our Part-Aware Data Augment

Jaeseok Choi 62 Jan 3, 2023
ICCV2021 Paper: AutoShape: Real-Time Shape-Aware Monocular 3D Object Detection

ICCV2021 Paper: AutoShape: Real-Time Shape-Aware Monocular 3D Object Detection

Zongdai 107 Dec 20, 2022
BADet: Boundary-Aware 3D Object Detection from Point Clouds (Pattern Recognition 2022)

BADet: Boundary-Aware 3D Object Detection from Point Clouds (Pattern Recognition

Rui Qian 17 Dec 12, 2022