Coder Social home page Coder Social logo

Comments (5)

grin avatar grin commented on August 19, 2024 2

So if anyone lands here: this repo is broken. I managed to get it working with the ^^^ above changes plus I had to replace the whole hourglass model. I used this implementation as a reference: https://github.com/yuanyuanli85/Stacked_Hourglass_Network_Keras/blob/eddf0ae15715a88d7859847cfff5f5092b260ae1/src/net/hg_blocks.py . It's implemented in Keras so it's easy to convert to TF2.

from tf2-mobile-2d-single-pose-estimation.

tucan9389 avatar tucan9389 commented on August 19, 2024 1

@grin

Thank you for answering.

Currently, the master branch is not properly working. I'm trying to solve some trouble by making a tmp branch. The code of the tmp branch worked properly, and the conversion to the coreml (or tflite) model is being carried out now.
I will merge the tmp branch to the master soon.

from tf2-mobile-2d-single-pose-estimation.

grin avatar grin commented on August 19, 2024

I'm seeing very similar broken prediction heatmaps after 70 epochs of training with loss 0.0046

from tf2-mobile-2d-single-pose-estimation.

grin avatar grin commented on August 19, 2024

@tucan9389 I think I found some errors in the code. Here: https://github.com/tucan9389/tf2-mobile-pose-estimation/blob/5248196af945ec81ae1935fd7fbb482e0e3ccf72/hourglass_model.py#L106-L113

Based on my understanding of how the Hourglass network works, it shouldn't merge and average the intermediate heatmaps. Instead, it should just return:

return hg_out, intermediate_heatmap_layers

And later, where you create the model, here: https://github.com/tucan9389/tf2-mobile-pose-estimation/blob/5248196af945ec81ae1935fd7fbb482e0e3ccf72/hourglass_model.py#L43-L45

The intermediate heatmaps should be set as outputs of the model, so it should look something like this:

        hg_next_stage, l2s = self.build_network(inputs, trainable=trainable) 
       
        self.model = tf.keras.Model(inputs=inputs, outputs=l2s)

But for this to work, the data loader should also repeat the label set for each image STAGE_NUM times. So that each intermediate output would get its own labels.

Or, am I missing something?

from tf2-mobile-2d-single-pose-estimation.

aeyoa avatar aeyoa commented on August 19, 2024

Thank you, @grin! I've already solved my problem using different approach. But it's interesting to get the clarification!

from tf2-mobile-2d-single-pose-estimation.

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.