Giter Club home page Giter Club logo

Comments (3)

lars76 avatar lars76 commented on June 2, 2024

Hi,

when you want to localize the dog/cat and also want to distinguish between the two classes, you have a mix of regression and classification.

This means:

  1. Add to the csv file a column "class" and load it in train_model.py
  2. the CNN has to output now 5 values (4 coords + 0 or 1 for class)
  3. You might have to use a merge layer https://keras.io/layers/merge/#concatenate_1 (one branch gets softmax, one branch gets identity activation i.e. "linear")
  4. Write a custom loss function that calculates MSE and cross entropy. The coord loss will have a stronger influence, maybe MSE will work for the class too. You could also weight the losses differently.

from object-localization.

ZengyuanYu avatar ZengyuanYu commented on June 2, 2024

Thank you for your advice, it is good for me.Good day!

from object-localization.

lars76 avatar lars76 commented on June 2, 2024

I just pushed some code that implements this (example_2).

from object-localization.

Related Issues (20)

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.