GithubHelp home page GithubHelp logo

bbenligiray / rml-cnn Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 2.0 137 KB

Semi-Supervised Robust Deep Neural Networks for Multi-Label Classification

Python 68.61% Shell 2.19% C++ 29.20%
multi-label-classification robust-machine-learning semi-supervised-learning loss-functions

rml-cnn's Introduction

RML-CNN

Code covering some of the experiments in the following paper:

Cevikalp, H., Benligiray, B., Gerek, O. N.. (2019). Semi-Supervised Robust Deep Neural Networks for Multi-Label Image Classification. In Pattern Recognition.

Use this to create a nus_wide.h5 and this to create a ms_coco.h5 file. Download resnet101_weights_tf.h5 from here. Put these in /rml-cnn, then run run.sh to run the experiments.

Alternatively, you can use the loss functions in ml_loss with any model/dataset you like, see main.py for reference. Note that your final layer's activation should be None for all loss functions (including softmax).

rml-cnn's People

Contributors

bbenligiray avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

mymuli wjcper2008

rml-cnn's Issues

About the calculation of top-3 index function --关于top-3指标函数计算的问题

I use the evaluation function given by you, in index TOP-3, and the calculation results are as follows:
P_C 65.06 R_C 79.06 F_C 65.92 --- P_O 65.06 R_O 67.81 F_O 66.41

But I found that there was a problem, because in index ALL, the calculation results are as follows:
P_C 79.54 R_C 66.22 F_C 71.70 --- P_O 82.17 R_O 70.42 F_O 75.84

The calculation results of P and R in index ALL and index TOP-3 are contradictory.
I think it's because of our different understanding of top-3 calculation.
我觉得是我们对计算top-3指标的理解不同造成的
指标
指标2
如果预测的前三名结果,有一个或两个或三个的概率均低于0.5(没有使用sigmoid时低于0),但是在代码里面全部赋值为1(正标签),这样做是有问题的,我们应该做一个判断,只有概率大于0.5(使用sigmoid时大于0)的情况才赋值为1...如果这样做的话,我的实验将会和论文《Learning Spatial Regularization with Image-level Supervisions for Multi-label Image Classification》的情况相同,不会出现ALL和TOP-3里面,P和R相互矛盾
If one or two or three of the predicted top three results are less than 0.5 (less than 0 when sigmoid is not used), but all of them are assigned to 1 (positive label) in the code, this is problematic. We should make a judgment that only when the probability is greater than 0.5 (more than 0 when sigmoid is used), the value will be assigned to 1... If this is done, my experiment will be compared with The situation of paper 《Learning Spatial Regularization with Image-level Supervisions for Multi-label Image Classification》is the same. There will be no contradiction between P and R in ALL and TOP-3.

top3[ind_example, top_pred_inds[k]] = 1

My code is as follows:

123

我个人认为你需要对代码进行修改,并且我认为修改后的实验结果,会比现在好
I personally think you need to modify the code, and I think the modified experiment results will be better than now

How to run this model?

Dear Sir:
I've read your paper and I'm very interested in your experiments... but I need some help from you.

  1. How to store datasets and ResNet in folders?
    2 .Can you give me some advice on training the model from scratch?

How to Compute mAP

rec = tp / np.sum(ground_truth)

When I calculate mAP with labels=[[1,0,1,0,0,0,0,1], [0,1,0,0,0,0,0,0,0,1,0],preds=[[0.6,0.2,0.7,0.3,0.2,0.3,0.4,0.3], [0.2,0.8,0.1,0.2,0.3,0.4,0.7,0.3]], the result is NAN.

I would like to ask what is the value of the parameter labels of function calculate_mAP (labels, preds)?

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.