Code Monkey home page Code Monkey logo

Comments (2)

NicolasHug avatar NicolasHug commented on September 26, 2024

Thanks for the feature request @matlabninja .

Supporting 1. and 3. SGTM, we could add target_types="binary-category" and target_types="detection".

I'm not sure I completely follow what you mean by 2. though - could you please share more details about this?

With the segmentation target type, produce trimaps with class/background/don't care regions instead of target/background/don't care when the output is a tensor

In the meantime, please feel free to submit a PR for 1. and 3.

from vision.

matlabninja avatar matlabninja commented on September 26, 2024

Thanks for the feedback @NicolasHug, I've put in a PR for 1. I made some changes to my original code to support "binary-category" as a target type, as that seemed to make more sense from a useability perspective than my previous setup with a separate input for "binary". As a result, I'll probably wait for 1 to clear before doing 3 as it opens up the door for binary detection as well.

I've put it in as draft as I am having some trouble running the unit tests locally (partially initialized module likely due to circular import). It's happening on all unit tests not just mine, so something is whacky with my config maybe. I was going to see how it went with running the unit tests in github instead.

Regarding the segmentation modification, all of the trimap png files in this dataset contain only the values 1, 2, and 3. 1 is used for pixels on the the pet, 2 for background, and 3 for a boundary region that can be used with the "ignore_index" of a loss function to not use that region for training. These png files do not have any class specific information in them, and the existing data loader, these files are loaded up directly. This doesn't let us use the data loader as-is to train a segmentation model supporting class differentiation.

The modification that I made changes that, but because modifying PIL images based on masks is a pain, I had this modification run after the transforms convert it to tensor. I certainly 'can' have it run earlier so that it is not transform dependent. See below for a example outputs with the current data loader. The change results in the background (2) becoming 37, the boundary region (3) becoming 38, and the "foreground region" (1) becoming something on [0,36] corresponding to the class label.
image

from vision.

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.