Hi everyone,
After training a resnet (18, 34 or 50) I do inference on new images.
I do prediction on img like this:
predicted_class = model.predict(img)[0] # index 0 to have only the class name
What I would like to have now is the vector of 512 features for this image.
I see that it is localized at the end, in the third group of layer of the resnet.
It is the output of the first “linear” (index 5 of group 3)
I can see this with model.summary
I don’t know how to retrieve these values.
Can you help me on this please
The idea is to collect kind of “fingerprint” for all the images and work later on similarity with these features…
Best regards