Coder Social home page Coder Social logo

ashwhall / dsnt Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 24.0 26 KB

An unofficial Tensorflow implementation of the DSNT layer, as taken from the paper "Numerical Coordinate Regression with Convolutional Neural Networks".

Home Page: https://arxiv.org/abs/1801.07372

License: Apache License 2.0

Python 100.00%
deep-learning neural-network python tensorflow

dsnt's Introduction

Ash Hall's GitHub

Machine Learning Research Engineer / Software Developer

More info and contact details on my website ๐Ÿ”—

Ash Hall's most used languages

Now playing on Spotify:

spotify-github-profile

dsnt's People

Contributors

alexbooth avatar ashwhall avatar yweweler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dsnt's Issues

dsnt in testing phase

Thanks for the code!

I am doing pose estimation and face a problem that the heatmap for predicting the left wrist also fires a little response on the right wrist, which means, the heatmap has two peaks, a strong peak on the left wrist and a weak peak on the right wrist.

The two peaks problem makes the dsnt predicted result uncorrect.
I understand the argument in paper that two peaks heatmap should be punished by the loss, while in the testing phase, ambiguity does happen sometimes

Do you have any suggestions?
Thanks!

Question about softmax

I think the _softmax2d should implent as ๏ผš
tf.exp(logits) / tf.reduce_sum(tf.exp(logits),[1,2], keepdims=True).

Why subtract the input by max value first as in dsnt.py _softmax2d as below?
max_axis = tf.reduce_max(target, axes, keepdims=True)
target_exp = tf.exp(target - max_axis)

Expected ground truth labels range unclear

Hi,
Thanks for this TF implementation. By looking at the code and functions' docstrings, it is unclear to me what the expected range for the ground truth coordinates is: in the guassian generation function, the coordinates are clearly expected to be between 0 and 1, whereas in the computation of dsnt_x and dsnt_y, the coordinate values are beteween -1 and 1. This will produce outputs coordinates between -1 and 1. So, what range should I pick for my labels ?
Best regards,
Pierre

Defining loss function

How do I define my loss function when it's my understanding that custom loss functions are only supposed to take 2 inputs, y_true and y_pred? For example here those are targets and coords:

def loss_function(targets, coords):
loss_1 = tf.losses.mean_squared_error(targets, coords)
loss_2 = dsnt.js_reg_loss(norm_heatmaps, targets)
loss = loss_1 + loss_2
return loss

But how do I get norm_heatmaps passed to the loss function?

more than one points

if there is more than one points, the heatmaps size is [batch, width, height, P_num].
then how to build DSNT Layer?

I try it, but fail!

Add license

Hi!
Your repository currently doesn't have any license attached. Is this intentional? By not including a license, it means nobody has permission to use, modify or share this code - check Choose a Licence.

Where is the Pytorch based implementation?

Hi @ashwhall !
Thanks for your great work!
I have read your paper "Numerical Coordinate Regression with Convolutional Neural Networks", and I remember it said in your paper that your code is "written in PyTorch, and is available online".
I am more familiar with PyTorch, so can you help me with a PyTorch version of your code? That will also help me a lot with my own work .

Details in implementing the Gaussian kernel

Hi ashwhall,

Thanks for sharing the code!
May I ask when you implement the gaussian kernel why you times the '((x-x0)**2 + (y-y0)2) / fwhm2' with 4*tf.log(2.) ? I understand the term: '((x-x0)**2 + (y-y0)2) / fwhm2' , but why choose 4 and log2? (Line 125, _make_gaussian function in the dsnt.py file)
It probably would not affect the results greatly, just being curious.

Many thanks,
C

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.