Code Monkey home page Code Monkey logo

chr's Introduction

SIXray:A Large-scale Security Inspection X-ray Benchmark for Prohibited Item Discovery in Overlapping Images

[Paper] [dataset]

Illustration

Requirements

Conda virtual environment is recommended: conda env create -f environment.yml

  • Python3.5
  • PyTorch: 0.3.1
  • Packages: torch, numpy, tqdm

Usage

  1. Clone the CHR repository:

    git clone https://github.com/MeioJane/CHR.git
  2. Run the training demo:

    cd CHR/
    bash CHR/runme.sh

Checkpoint

If you only want to test images, you can download here.

Citation

If you use the code in your research, please cite:

@INPROCEEDINGS{Miao2019SIXray,
    author = {Miao, Caijing and Xie, Lingxi and Wan, Fang and Su, chi and Liu, Hongye and Jiao, jianbin and Ye, Qixiang },
    title = {SIXray: A Large-scale Security Inspection X-ray Benchmark for Prohibited Item Discovery in Overlapping Images},
    booktitle = {CVPR},
    year = {2019}
}

Acknowledgement

In this project, we reimplemented CHR on PyTorch based on wildcat.pytorch.

chr's People

Contributors

meiojane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chr's Issues

PermissionError: [Errno 13] Permission denied: '/DATA'

hi~

When I run this program with "bash CHR/runme.sh",the output in terminal is :

Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/yg/Desktop/workspace/CHR/CHR/CHR/CHR/main.py", line 110, in
main_ray()
File "/home/yg/Desktop/workspace/CHR/CHR/CHR/CHR/main.py", line 83, in main_ray
train_dataset = XrayClassification(args.data, 'train')
File "/home/yg/Desktop/workspace/CHR/CHR/CHR/CHR/ray.py", line 95, in init
os.makedirs(path_csv)
File "/usr/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
[Previous line repeated 2 more times]
File "/usr/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/DATA'

In fact , I have not folder named '/DATA'.
What is the purpose of this folder? And how can I use dataset(SIXray) in this project?

thx!

Where is the localization in code

To verify that CHR is not over-tuned to image classification, you attach the class activation map (CAM) .Where is this part of the code

Request Pre-trained model

Hi, I saw your research result. Looks good, thank you.

  1. Can I request the pre-trained model?
  2. And I couldn't join the Baidu, so could you share the download other link?

Thank you

How Debug MulticlassTop5Engine?

Hello, I want to use MulticlassTop5Engine(Class) to measure accuracy.
But get some errors:
"input_var = torch.autograd.Variable(self.state['input'])
TypeError: Variable data has to be a tensor, but got list"
But when using MultiLabelMAPEngine(Class), not those errors.

Can you add the code of how to run class MluticlassTop5Engine?
Thanks!

batch size of plain CNN models

It is mentioned that CHR approach used only one sample to update the learnable parameters, similar to stochastic gradient descent. I am wondering if, during the experiments, you also trained the plain CNN models in the same way. Did you also use only one sample for training plain models (say ResNet50, DenseNet, etc.)? If not, what is the batch size? More generally, can you state the training set up for both the plain CNN and CHR method? (Learning rate, optimizer, batch size, number of epochs, etc.) It is not clear whether the default values in your code were the exact values used in training. Also, did you use pretrained weights for the backbones?

Are class weights computed in the loss function?

thanks for the great work. I see that the loss of the netwok is a self implemented binary cross entropy loss parameterized by class weights. (I guess the weights are used to adress the imbalanced data labels?). I read the code in main.py, but I didn't see the weights take part in any computation
-(target*torch.log(input+eps)+(1-target)*torch.log(1-input+eps))
Would this be updated later? Thanks

Full annotation files

Hi, it's a great job that you made such a dataset. But I meet a problem that I could onlt downlad 1.4k annotations, could you please upload the full annotation files? Thanks.

Regarding difficult examples

Are the results on your paper based on the mAP calculated with difficult examples set as True? It seems that in your code, this was set to true.

Link to Model Weights

Hello, @MeioJane,

First of all let me congratulate you. As a Computer Vision enthusiast, I admire the work you've made in this research. I would very much like to reproduce your results and build upon your amazing work. But, in order to do that, I would need your trained model weights, as I can't afford to retrain the model from scratch right now. I tried to download the weights using the link you've provided (from Baidu) but I was unsuccessful. Could you please share the file with me, via another link?

Thanks in advance. My institutional e-mail is [email protected].

run out of memory

When I run the program,Instead of using the GPU, the memory utilization keeps increasing until it is 100%.How to solve this problem?Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.