Giter Site home page Giter Site logo

Comments (11)

vishnuvardhan58 avatar vishnuvardhan58 commented on September 26, 2024 1

Hello @Altimis ,it is working if I have more images. Thankyou.

from confusion-matrix-for-mask-r-cnn.

Altimis avatar Altimis commented on September 26, 2024 1

Great! Happy to help. I will fixe this issue as soon as possible, thank you .

from confusion-matrix-for-mask-r-cnn.

Altimis avatar Altimis commented on September 26, 2024

Hello @vishnuvardhan58 , could you please show me the whole error message. Did you generate the gt_tot and pred_tot lists of ground-truth and predictons ?

from confusion-matrix-for-mask-r-cnn.

vishnuvardhan58 avatar vishnuvardhan58 commented on September 26, 2024

Hello @Altimis ,here is the whole error message

Capture

Capture2

from confusion-matrix-for-mask-r-cnn.

vishnuvardhan58 avatar vishnuvardhan58 commented on September 26, 2024

yes , I have generated gt_tot and pred_tot lists of ground-truth and predictons .

from confusion-matrix-for-mask-r-cnn.

Altimis avatar Altimis commented on September 26, 2024

Hi again @vishnuvardhan58 , I think that I spotted where is the problem. The porblem is in the line
columns = range(1, len(np.unique(y_test))+1)
Either you need to remove the "+1" or set len(np.unique(y_test)) to the number of your classes + 1 (background). If neither f these work, please let me know.

from confusion-matrix-for-mask-r-cnn.

Altimis avatar Altimis commented on September 26, 2024

I would like to take a look at your gt_tot and pred_tot

from confusion-matrix-for-mask-r-cnn.

vishnuvardhan58 avatar vishnuvardhan58 commented on September 26, 2024

Hello @Altimis , I am still getting the same error after making the above changes ,

Please find the gt_tot and pred_tot values , I have 3 images in my test_set

Capture

from confusion-matrix-for-mask-r-cnn.

Altimis avatar Altimis commented on September 26, 2024

Ah okey I get it. In fact, the columns = range(1, len(np.unique(y_test))+1) means that there is (1,5) since len(np.unique(gt_tot)) = 4 in your case. But your pred_tot vector doesn't contain background class (0) so it's len is equal to 3 and not 4 like gt_tot.
The problem is exacty in df_cm = DataFrame(confm, index=columns, columns=columns) since I've set index = columns = range(1, len(np.unique(y_test))+1) since confusion matrix should be square. In fact i didnt include in my code the case where the model doesn't detect background intead of an object (you used only 3 images, if you used more for testing I'm sure this probleme wont occure.

from confusion-matrix-for-mask-r-cnn.

Altimis avatar Altimis commented on September 26, 2024

I will try to solve this problem by including the case where the model doesn't miss ^^. For now, you can test your model on more data and it will probably work

from confusion-matrix-for-mask-r-cnn.

vishnuvardhan58 avatar vishnuvardhan58 commented on September 26, 2024

I will try with more data @Altimis , and I will let you know.

from confusion-matrix-for-mask-r-cnn.

Related Issues (14)

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.