Code Monkey home page Code Monkey logo

Comments (5)

HowieMa avatar HowieMa commented on May 24, 2024

Hi, you can find the preprocessed datasets from the README.md
However, I cannot provide the preprocessing code as it was on my old computer which was broken :(

The basic idea is very simple, and you can try to implement it by yourself:
Firstly, get the coordinates of key points in the whole body image, and then get the bounding box value, and then crop the image, and then adjust the coordinates.

For the heatmap generation, you can check this function:
https://github.com/HowieMa/NSRMhand/blob/master/dataset/hand_ldm.py#L91

from nsrmhand.

D1vyansh avatar D1vyansh commented on May 24, 2024

Hey, Thanks for the quick response, it worked for me!
I have some doubts about the evaluation PCK metric in utils.py file, can you tell the size of the box [ variable - bb_size] what is the value of that?

from nsrmhand.

HowieMa avatar HowieMa commented on May 24, 2024

Hey, Thanks for the quick response, it worked for me!
I have some doubts about the evaluation PCK metric in utils.py file, can you tell the size of the box [ variable - bb_size] what is the value of that?

Hi, this is just the tightest bounding box of the hand.

from nsrmhand.

D1vyansh avatar D1vyansh commented on May 24, 2024

Also, in your paper, it is mentioned: "All hand image patches are resized to 368×368 before fed into our model, yielding 46×46 representation maps". So is the final evaluation done on keypoints extracted from a 46x46 size heatmaps while the PCK threshold is [σ * (im_size/2.2)]. where σ ranges from 0 to 1 and im_size is the width of the cropped image?

from nsrmhand.

HowieMa avatar HowieMa commented on May 24, 2024

Also, in your paper, it is mentioned: "All hand image patches are resized to 368×368 before fed into our model, yielding 46×46 representation maps". So is the final evaluation done on keypoints extracted from a 46x46 size heatmaps while the PCK threshold is [σ * (im_size/2.2)]. where σ ranges from 0 to 1 and im_size is the width of the cropped image?

Hi, actually, I perform the evaluation on the original image scale, but it should be nearly the same as the evaluation on the 46 * 46 heatmap.
For example, the original image for cropped hand has size 256 * 256, I will firstly resize it to 368 * 368, and send it to the model. The output heatmap has size 46 * 46, then I can get the location of the peak value. For example, the peak's coordinate in the 46 * 46 heatmap is (23,23). Then its location in the original image is 23 * 256 / 46 = 128. If the ground truth location is (130, 130). Then I can calculate the PCK by
sqrt ((130 - 128)**2 + (130 - 128)^^2 ) < sigma * 256 / 2.2

You can easily find all solutions to your questions from here. Thanks!

# get coordinate of keypoints in origin image scale

pck_dict[sigma].append(PCK(pred_label, gt_label, im_size/2.2, sigma))

from nsrmhand.

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.