Comments (1)
Thank you very much for your work. I have a problem: if nn. MSELoss () is used as the loss function, and the Heatmap output from the network is directly compared with the generated Heatmap, the loss value will be abnormally large. How to deal with this problem?
I found that your code is:
criterion = nn.MSELoss(reduction='sum')
loss = criterion(pred, target)
return loss / (pred.shape[0] * 46.0 * 46.0)
Do you use this loss function to avoid excessive loss?
Hi, thank you for asking. The output size is (batch_size, S=3, C=21, 46, 46), because we have 3 stages for keypoints, 21 keypoints, and image size is 46 * 46. As I use 'nn.MSELoss(reduction='sum')', so I need to divide the batch size * 46 * 46 to make it smaller. You can also use 'nn.MSELoss(reduction='mean')' to avoid dividing.
I write the loss function in this way simply because I want the loss value can reflect the stage number S and channel number C. In detail, the first 3 stages are mask or limb representation, and it has size (batch size, S=3, C=1 or 7, 46, 46). And the last 3 stages are keypoints heatmaps, and its size is (batch size, S=3, C=21, 46, 46).
from nsrmhand.
Related Issues (20)
- demo output HOT 10
- mediapipe hand landmark detect HOT 1
- How to use NSRM in HR-Net HOT 6
- How to get 21 keypoints annotations after cropping the original image? HOT 2
- missing limb structure problems HOT 1
- hand tightest bounding box? HOT 1
- CMU Panoptic file HOT 5
- What do mask1, mask2 and mask3 mean๏ผ HOT 1
- predict two hands from single picture HOT 5
- The results of other test images is error HOT 1
- Encounter segfault when running inference.py HOT 2
- ./CPM used in training? HOT 1
- src.augmentation missing
- model structure in code incompatible with in paper HOT 5
- Required dataset HOT 1
- Question about LM loss HOT 1
- Can the model predict hand boundary boxes on its own? HOT 2
- Can you provide the OneHand 10k dataset? HOT 1
- How to run the OneHand10K dataset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsrmhand.