A machine learning-driven image recommendation system designed to predict and personalize image suggestions based on user interactions, leveraging advanced embeddings and logistic regression models.
Testing algorithm for user interactions
Including interactions such as likes, comments, watch time per image and showing more content geared toward the user preference
folder: image rec final testsqlflask
steps:
- remove existing dataset and folder (if existing already)
rm -rf data/validation/data
(may need to elevate permissions to delete)
-
python ./app.py
build:
make build
run:
make run
- Stop/Remove/Clean: make stop
make remove
make clean
home page displays a wide range of content and the users interactions are recorded
these recorded interactions are weighted upon their strengths to show content geared toward the user on the image recommendations page
Using resnet50 for image classification
Machine learning implementation:
-
Build and run project, and interact with images by liking and commenting
-
Train model
http://localhost:5000/train_model
This triggers training process inside docker container at "/app/data/recommender_model.pkl" -
View recommendations tab which should better reflect interactions consistent with images liked and commented
-
Inspect / debug model:
Check trained model using check_model.py script
First option:
i. Enter container shell (docker must be running: make build / make run/ docker ps -a (for logs: docker logs image_recommendation_container))
docker exec -it image_recommendation_container /bin/bash
Second option:
Or go to route: http://localhost:5000/debug_model
In this example the user mainly interacted with labels such as cars and vehicles on the general page, therefore they are displayed images based upon these in their recommended tab: