material_recommender icon indicating copy to clipboard operation
material_recommender copied to clipboard

unable to add the pretrained model

Open ertlfuwa opened this issue 5 years ago • 4 comments

Hi,

I added the pretrained model from KÁROLY ZSOLNAI-FEHÉR, but received following error:

ValueError: Input 0 of layer dense_1 is incompatible with the layer: expected axis -1 of input shape to have value 10240 but received input with shape [None, 10752]

I replaced the cnn_architecture.json and cnn_weights.h5 with the pretrained model inside the gms folder.

ertlfuwa avatar Nov 15 '20 19:11 ertlfuwa

If I understood correctly, you tried to use KÁROLY ZSOLNAI-FEHÉR's network in my code. This will not work because my application has a different purpose. I trained a network that generates material animations (basically a bunch of images in which the light source moves above the material preview) and my code works with that assumption. The shapes of my network's input/output differ from Karoly's.

vladvrabie avatar Nov 15 '20 22:11 vladvrabie

Ok, I thought I have to use it’s network, cause i received the error that the file cnn_weights.h5 is missing.

Is it possible to explain the use of your project and how to use it more detailed. It’s a bit misleading, I understood it as a easier way to use the work of KÁROLY ZSOLNAI-FEHÉR within Blender.

ertlfuwa avatar Nov 16 '20 10:11 ertlfuwa

You can find the file cnn_weights.h5 in the releases section.

I mention his paper in order to give credits to his idea. It is an easier way to use the ideas presented in the paper because they are actually implemented in Blender, but the ideas are expanded. The code provided in the original paper only has some material shading and neural net training, but no actual features implemented in Blender.

The extension generates some random material animations that the user can score to train a model that learns the preferences of the user. Then the model gives recommendations based on those preferences - all inside of Blender

vladvrabie avatar Nov 16 '20 11:11 vladvrabie

Ok, thx

ertlfuwa avatar Nov 16 '20 12:11 ertlfuwa