Giter Site home page Giter Site logo

Image transforms about human-parsing HOT 7 CLOSED

geekswaroop avatar geekswaroop commented on June 3, 2024
Image transforms

from human-parsing.

Comments (7)

Shree987 avatar Shree987 commented on June 3, 2024

@geekswaroop Should the original image also be changed, or only resizing the input image before converting to array is sufficient?

from human-parsing.

geekswaroop avatar geekswaroop commented on June 3, 2024

What's the difference between original image and input image?

from human-parsing.

Shree987 avatar Shree987 commented on June 3, 2024

Input image could be the resized image (resized only once, not each time we run the code)

from human-parsing.

Shree987 avatar Shree987 commented on June 3, 2024

I think PIL.Image.resize() does the work. Can you cross-check once if that is what is needed? @geekswaroop

from human-parsing.

geekswaroop avatar geekswaroop commented on June 3, 2024

PIL functions don't work well with torch Tensors. Refer to the documentation linked above

from human-parsing.

Shree987 avatar Shree987 commented on June 3, 2024

@geekswaroop Why should the transformation be applied to tensors? Can't we directly do it for images and save them as part of preprocessing?
Doing for tensors might be hectic as each time the code is run, tensors are changed .

from human-parsing.

geekswaroop avatar geekswaroop commented on June 3, 2024

Hi, I wasn't clear in my description. I want you to compose 2 transformations for both ground truth and images.

Basically, return a dictionary containing keys as img and gt whose corresponding values in the composition object whose documentation I have linked above.

For the transformation object, you first need to resize the image to 256x256 with 3 channels. Then convert to tensor. Next, normalise the image

For ground truth, just resize image to 256x256 with 1 channel.

Hope this is clear. Send in a PR, I will review it. Thanks!

from human-parsing.

Related Issues (9)

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.