Photo Sharing App is a web app that allows a user to get group photos that include them without having to keep or sort through all of the photos, saving them time and storage space. When a photo is uploaded, the app identifies the faces in it and arranges them according to the users who have been identified. Each identified user gets a separate album with all their photos allowing them to get the photos they need seamlessly. Upload group photos, arrange them by faces using ML and share them with ease. 🤳🤖
- Option 1: Use the deployed version at: https://photo-organizer.herokuapp.com/
- Option 2:
- Download and install the latest version of Git.
- (Optional) Set your username in Git.
- (Optional) Set your commit email address in Git.
- Run
git clone git@github.com:OpenLake/Photo-Sharing-App.git
cd Photo-Sharing-App
- Make a virtual environment named .env
python3 -m venv .env
- Activate
.env
bysource .env/bin/activate
- Download the requirements
pip install -r requirements.txt
- Run script
bash setup.sh
- Go to http://127.0.0.1:8000/
- You are good to go! 🤘
Here I have uploaded 6 images of Harry Potter cast.
After pressing "Process" we get these 3 albums of faces present in the photos we uploaded.
This is Ron Weasley a.k.a Rupert Grint's album. Out of the original 6 images he was present in just 4 and now we can download these pics indiviually or as a zip.
When a user uploads a group photos and starts to "Process" it, the Face Recognition library detects all the faces present in the group image. After detecting the faces it reduces them into a 128 length vector. Now each image is represented by a vector of length 128. Once we have obtained the vectors the task that remains is to cluster them. This being an unsuervides clustering problem so I have used DBSCAN. This method doesnt need to know the number of clusters beforehand. It divides all the images into clusters where each clsuter belongs to a single person as the simmilarity between the images of the same person is more hence they get clustered closely. Now each cluster gets an indiviual album from where you can download the album or a single image indiviually.
Q: I got Error: That port is already in use.
A: It occurs because some process has occupied that port. You may kill the process using sudo fuser -k 8000/tcp
or use a different port. For using a different port simply replace bash setup.sh
with bash setup.sh <port-number>
. An example bash setup.sh 7000
. Now your app will successfully run on http://127.0.0.1:7000/