3
$\begingroup$

I have a dataset that contains information of pets (Breed,color,age,some text descriptions) and images of that pet. One pet can have more images than others.

I want to combine these images somehow to generate a single 1x255 feature so that I can merge it with the non-image features and use for my model.

One way I can think of is to put each image of a pet through a pretrained model to get a 1x255 output, then averaging out all of the outputs to get a single feature of that pet. But I havenät seen any paper/people doing the same to backup my intuition...

I'm new to data science, so if you have any thoughts just let me know. Thanks in advance.

$\endgroup$

1 Answer 1

1
$\begingroup$

Your initial intuition seems pretty good to me. A pretrained image classifier like VGG19 or ResNet, as included in the Keras library will yield simple vectors if the include_top parameter is set to False upon initialization. You can then use a method like PCA to reduce the dimensionality to 255, or whatever number your algorithm can handle. Averaging the vectors before or after this step will allow you to merge the photos. You will need to test which works best for your application.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.