Skip to content
/ CTDA Public

Controlling Background Transparency for Data Augmentation

Notifications You must be signed in to change notification settings

ysy19/CTDA

Repository files navigation

CTDA

'Controlling Background Transparency for Data Augmentation' 구현 코드입니다.

○ Overview

Abstract

이미지 속의 객체는 대체로 특정한 배경 맥락 속에서 존재하기에, 네트워크가 학습할 때 객체가 가지고 있는 배경을 불가피하게 학습하게 된다. 하지만 학습에 긍정적 영향을 주는 배경도 있지만, 일반적인 배경이 아닐 경우 부정적인 영향을 주기도 한다. 따라서 이 연구에서는 이미지에서 배경의 투명도에 차이를 두어 배경의 영향력을 최적화할 수 있는지 검증해보고자 한다. Salient Object Detection 방법을 통해 배경과 객체를 분리하여 mask map을 생성하고 이를 토대로 투명도 10%~90%까지 설정한 이미지를 생성하였다. ImageNet과 Caltech101로 실험을 진행한 결과 비교적 Salient Object Detection 성능이 높은 Caltech101에서는 배경의 투명도를 조정한 이미지가 원본 이미지보다 더 높은 성능을 보이며, 배경의 영향력을 최적화할 수 있음을 보였다. 이를 통해 배경의 정보량을 조절할 때, 더 높은 성능을 가져올 수 있음을 확인하였다.

Network

image

Result 1) Images

image ImageNet 투명도 조정 이미지 생성결과. 왼쪽 상단 투명도 10%부터 오른쪽 하단 투명도 90%.

image Caltech101 투명도 조정 이미지 생성결과. 왼쪽 상단 투명도 10%부터 오른쪽 하단 투명도 90%.

Result 2) Experiments

  1. Caltech101 dataset 투명도 이미지 정확도

image Test Top-1 Accuracy

image Test Top-5 Accuracy

  1. ImageNet dataset 투명도 이미지 정확도

image Test Top-1 Accuracy

image Test Top-5 Accuracy

○ Usage

  1. Clone this repo
git clone https://github.com/ysy19/CTDA
  1. Download the pre-trained model basnet.pth from GoogleDrive and put it into the dirctory 'saved_models/basnet_bsi/'

  2. Download the data which you want : 'ImageNet' or 'Caltech101'

  3. Edit the path of 'dataset' and 'the folder where you want to save mask map images' and 'the folder where you want to save masking images' in the file.

  4. Make and Train 5.1 Imagenet

  • Cd to the directory 'BASNet'
  • Cd to the directory 'ImageNet_train'
  • Run the masking and making background deleted image process by command :
python masking.py
  • Run training process by command :
python train.py

5.1 Caltech101

  • Cd to the directory 'BASNet'
  • Cd to the directory 'Caltech101_train'
  • Run the masking and making background deleted image process by command :
python masking_101.py
  • Run training process by command :
python train_101.py

○ References

  • [1] Xuebin Qin, Deng-Ping Fan, Chenyang Huang, Cyril Diagne, Zichen Zhang, Adria Cabeza Sant’Anna, Albert Suarez, Martin Jagersand, and Ling Shao, “BASNet : Boundary-Aware Segmentation Network for Mobile and Web Applications”, In CVPR, 2019.

  • BASNet 'https://github.com/xuebinqin/BASNet'

  • [2] Jinwoo Choi, Chen Gao, Joseph C. E. Messou, Jia-Bin Huang, “Why Can’t I Dance in the Mall? Learning to Mitigate Scene Bias in Action Recognition”, In NeurIPS, 2019.

  • [3] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li and Li Fei-Fei, “ImageNet: A Large-Scale Hierarchical Image Database”, In CVPR, 2009.

  • [4] Li Fei-Fei, Rob Fergus, Pietro Perona, “Learning Generative Visual Models from Few Training Examples : An Incremental Bayesian Approach Tested on 101 Object Categories.”, In CVPR, 2004.

  • [5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun, “Deep Residual Learning for Image Recognition”, In CVPR, 2016.

About

Controlling Background Transparency for Data Augmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages