Code Monkey home page Code Monkey logo

Comments (5)

gabrieldemarmiesse avatar gabrieldemarmiesse commented on June 7, 2024

Can you try to give me a script to reproduce the issue? It can be very difficult to pinpoint the cause of the bug otherwise.

from heatmaps.

VinayTeki avatar VinayTeki commented on June 7, 2024

I've used my model like this:

json_file = open(
    '/home/hashed/PoshaQ/testing/heatmap/neck_model_version1_convo2D_Nor_PReLU_do.json', 'r')
loaded_model_json = json_file.read()
json_file.close()
loaded_model = model_from_json(loaded_model_json)

loaded_model.load_weights("/home/hashed/PoshaQ/testing/heatmap/Neck_96_96_version1_conv2D_Nor_PReLU_do.h5")
print("Loaded model from disk")


new_model = to_heatmap(loaded_model)
idx = 0
display_heatmap(new_model, "/home/hashed/PoshaQ/testing/wrong_cropped/3146.jpg", idx)
`

And the model architecture looks like this
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_1 (InputLayer)         (None, 96, 96, 1)         0         
_________________________________________________________________
conv2D_1 (Conv2D)            (None, 96, 96, 32)        832       
_________________________________________________________________
bn_conv1 (BatchNormalization (None, 96, 96, 32)        128       
_________________________________________________________________
p_re_lu_1 (PReLU)            (None, 96, 96, 32)        294912    
_________________________________________________________________
conv2D_2 (Conv2D)            (None, 96, 96, 32)        9248      
_________________________________________________________________
bn_conv2 (BatchNormalization (None, 96, 96, 32)        128       
_________________________________________________________________
p_re_lu_2 (PReLU)            (None, 96, 96, 32)        294912    
_________________________________________________________________
max_pool1 (MaxPooling2D)     (None, 48, 48, 32)        0         
_________________________________________________________________
conv2D_3 (Conv2D)            (None, 48, 48, 64)        18496     
_________________________________________________________________
bn_conv3 (BatchNormalization (None, 48, 48, 64)        256       
_________________________________________________________________
p_re_lu_3 (PReLU)            (None, 48, 48, 64)        147456    
_________________________________________________________________
flatten_1 (Flatten)          (None, 147456)            0         
_________________________________________________________________
dense_1 (Dense)              (None, 512)               75497984  
_________________________________________________________________
p_re_lu_4 (PReLU)            (None, 512)               512       
_________________________________________________________________
dropout_1 (Dropout)          (None, 512)               0         
_________________________________________________________________
dense_2 (Dense)              (None, 9)                 4617      
=================================================================
Total params: 76,269,481
Trainable params: 76,269,225
Non-trainable params: 256
_________________________________________________________________

from heatmaps.

gabrieldemarmiesse avatar gabrieldemarmiesse commented on June 7, 2024

Thanks! I'll look it up once I have more time. In the meantime, can you also give me the version of keras that you are using?

from heatmaps.

VinayTeki avatar VinayTeki commented on June 7, 2024

the version is 2.2.2
thanks

from heatmaps.

gabrieldemarmiesse avatar gabrieldemarmiesse commented on June 7, 2024

I will need the script which you used to create the model (I don't need to train it) it's just painful to re implement it just from the summary which you are providing. Could you copy past it there? Thank you.

from heatmaps.

Related Issues (15)

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.