Hi @vad13irt
So, to generate the embeddings, we first took all of the images which had their corresponding labels and put them into ( for ex. resnet18 ) model, and then we extracted the features of the images from a certain layer of the model. This blog is also quite good if you want to understand the whole process.
Let me know if you have any questions. Enjoy Blitz 
Shubhamai