Coder Social home page Coder Social logo

Comments (3)

PINTO0309 avatar PINTO0309 commented on July 21, 2024 1

Just concat each layer. My goal is to quantize it while maintaining accuracy, so I deliberately exclude the final layer of concat.

# Block_33
conv33_1 = Conv2D(filters=2, kernel_size=[1, 1], strides=[1, 1], padding="same", dilation_rate=[1, 1],
kernel_initializer=Constant(np.load('weights_back/classificator_16_Kernel').transpose(1,2,3,0)),
bias_initializer=Constant(np.load('weights_back/classificator_16_Bias')))(relu31_1)
reshape33_1 = tf.reshape(conv33_1, (1, 512, 1), name='classificators_1')
# Block_34
conv34_1 = Conv2D(filters=6, kernel_size=[1, 1], strides=[1, 1], padding="same", dilation_rate=[1, 1],
kernel_initializer=Constant(np.load('weights_back/classificator_32_Kernel').transpose(1,2,3,0)),
bias_initializer=Constant(np.load('weights_back/classificator_32_Bias')))(relu32_1)
reshape34_1 = tf.reshape(conv34_1, (1, 384, 1), name='classificators_2')
# Block_35
conv35_1 = Conv2D(filters=32, kernel_size=[1, 1], strides=[1, 1], padding="same", dilation_rate=[1, 1],
kernel_initializer=Constant(np.load('weights_back/regressor_16_Kernel').transpose(1,2,3,0)),
bias_initializer=Constant(np.load('weights_back/regressor_16_Bias')))(relu31_1)
reshape35_1 = tf.reshape(conv35_1, (1, 512, 16), name='regressors_1')
# Block_36
conv36_1 = Conv2D(filters=96, kernel_size=[1, 1], strides=[1, 1], padding="same", dilation_rate=[1, 1],
kernel_initializer=Constant(np.load('weights_back/regressor_32_Kernel').transpose(1,2,3,0)),
bias_initializer=Constant(np.load('weights_back/regressor_32_Bias')))(relu32_1)
reshape36_1 = tf.reshape(conv36_1, (1, 384, 16), name='regressors_2')

from pinto_model_zoo.

vladmandic avatar vladmandic commented on July 21, 2024

thanks, that (sort of) worked, just had to be careful with order of concat operations.

but...using same code for front and back model (just changing image inputsize) and it seems back model is far worse than front one - i expected that it would be able to handle smaller faces as advertised by mediapipe, but it only detects faces when it fills 50% of input frame - or i'm doing something wrong (could be issue with predefined anchors?).

do you have any experience with it?

from pinto_model_zoo.

vladmandic avatar vladmandic commented on July 21, 2024

nvm, it was a problem with my math on generating anchors - blazeface-back works just fine!
i'm closing this issue - thanks for your help!

from pinto_model_zoo.

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.