Giter Site home page Giter Site logo

Comments (9)

shuxp avatar shuxp commented on June 2, 2024 1

It can definitely, but you have to retrain it. The pretrained ones have been trained with crop=0.1 since this is a common values, used for good face detectors.

OK, I will try this. Thanks a lot.

from shapenet.

justusschock avatar justusschock commented on June 2, 2024

You could for example replace the values obtained from the landmarks with the values from a face detector. The easiest approach would be to install dlib and use the frontal_face_detector

from shapenet.

shuxp avatar shuxp commented on June 2, 2024

You could for example replace the values obtained from the landmarks with the values from a face detector. The easiest approach would be to install dlib and use the frontal_face_detector

Is this mean if I want to get keypoints from an object, I have to get bbox/lmk_bounds first? If my bbox is not accuracy, when set a larger area(crop = 0.2), can shapenet detects lmk well? In my private datasets, it seems not fit well...

from shapenet.

justusschock avatar justusschock commented on June 2, 2024

It can definitely, but you have to retrain it. The pretrained ones have been trained with crop=0.1 since this is a common values, used for good face detectors.

from shapenet.

shuxp avatar shuxp commented on June 2, 2024

It can definitely, but you have to retrain it. The pretrained ones have been trained with crop=0.1 since this is a common values, used for good face detectors.

If I have no lmk_bound, I should set crop=None in SingleShapeDataset.
And in the inference, the code as follows.
Is this the right way?

h, w = sample.img.shape[:2]
min_y, min_x, max_y, max_x = 0, 0, h, w
range_x = max_x - min_x
range_y = max_y - min_y
    
max_range = max(range_x, range_y) * (1 + crop)
    
center_x = min_x + range_x / 2
center_y = min_y + range_y / 2
    
tmp = sample.crop(center_y - max_range / 2,
                  center_x - max_range / 2,
                  center_y + max_range / 2,
                   center_x + max_range / 2)

from shapenet.

justusschock avatar justusschock commented on June 2, 2024

Yes, that's the way I would do this.

You should note, that the parameters for affine transformations are learned by the network, therefore it may not be that good to provide an image with lot's of non-face pixels around. Also the PCA might not be that suitable, since the face might be smaller and this might lead to an ambigous representation.

That said, it should nevertheless work, but may not perform exactly as good as the cropped version

from shapenet.

shuxp avatar shuxp commented on June 2, 2024

Yes, that's the way I would do this.

You should note, that the parameters for affine transformations are learned by the network, therefore it may not be that good to provide an image with lot's of non-face pixels around. Also the PCA might not be that suitable, since the face might be smaller and this might lead to an ambigous representation.

That said, it should nevertheless work, but may not perform exactly as good as the cropped version

OK, I will try it, thanks a lot.

from shapenet.

justusschock avatar justusschock commented on June 2, 2024

Hope this works for you. Please report back.

from shapenet.

shuxp avatar shuxp commented on June 2, 2024

Hope this works for you. Please report back.

Absolutely. I am going to train now.

from shapenet.

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.