- Notifications
You must be signed in to change notification settings - Fork4
GuoleiSun/HNC_loss
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains the original code and the links for data and pretrained models. If you have any questions aboutour paper, please feel free to contactMe (sunguolei.kaust AT gmail.com)
To use our loss, please first generate CAMs following thisline.
Our loss can be found inHNC_mse andHNC_kd. The usage of loss can be found in thisline, where our loss takes two arguments: CAMs and ground-truth label.
Note: 1. you may need to tune lambda, which is the weight balancing both HNC loss and cross entropy loss. Higher weight means higher influence of HNC loss; 2. you may need to tune k, which is the number of negative CAMs to suppress. Smaller k means focusing on more confusing classes.
1). prepareImageNet dataset
2). for running commands, please refer to './imagenet/running-script.sh'
If you find this repository helpful, please consider citing:
@article{sun2020fixing,
title={Fixing Localization Errors to Improve Image Classification},
author={Sun, Guolei and Khan, Salman and Li, Wen and Cholakkal, Hisham and Khan, Fahad and Van Gool, Luc},
journal={ECCV},
year={2020}}
This repository is based onCBAM, thanks for their excellent work.