Coder Social home page Coder Social logo

How to draw boxes? about nudenet HOT 4 CLOSED

burgerlawful avatar burgerlawful commented on May 23, 2024 1
How to draw boxes?

from nudenet.

Comments (4)

bedapudi6788 avatar bedapudi6788 commented on May 23, 2024 1

In the pre processing of the image, padding etc is done, thus changing the dimensions of the original input image.

For drawing boxes, these new dimensions have to be mapped back.

I will add a censor() function with these changes in a few days.

from nudenet.

kalvinmc avatar kalvinmc commented on May 23, 2024

Yeah the box values seem to be off for me aswell.

I dug around through the code and found that the box returned is [x, y, width, height]. But if I transform this to top upper right lower coordinated as (box[0], box[1], box[0] + box[2], box[1] + box[3]) for cropping, the x0 coordinate in combination with the width seems to always be off. Either it starts too to the right on the left breast and doesn't cover it all on the left side or too to the left on the right breast and doesn't cover it all on the right side. Actually, I ended up noticing the y height combination is off aswell.

This used to work perfectly with v2 but in v2 I didn't have to change the box coordinates at all. I could just pass it to crop as they were. It seems the box values changed between v2 and v3

The web version does it perfectly for the same image. The thing I noticed is that the web version shows me a smaller image and mine are large images.

from nudenet.

bedapudi6788 avatar bedapudi6788 commented on May 23, 2024

The boxes logic is fixed by @pa4y in #128

from nudenet.

bedapudi6788 avatar bedapudi6788 commented on May 23, 2024

def censor(self, image_path, classes=[], output_path=None):

censor function is now added. refer to readme for example.

from nudenet.

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.