PicSort is a FastAPI-based mini backend that takes a zipped folder of images, detects and analyzes faces using DeepFace, and returns a zipped folder of images grouped into folders by unique faces. It also detects and separates images with:
- No faces (in a
no_faces
folder) - Invalid/corrupt files (in an
invalid
folder)
- Upload a zipped folder of images
- Automatically detect and group similar faces into individual folders
- Separate:
- Images with no face
- Corrupted or unreadable files
- Download a zipped, sorted version of your original dataset
- In-memory face matching using DeepFace + Facenet (no database required)
- CORS-enabled for frontend integration
- Python 3.8+
- FastAPI
- DeepFace (with Facenet and VGG model)
- OpenCV, shutil
- Uvicorn (ASGI server)
git clone https://github.com/5-Abhi-5/PicSort.git
cd picsort
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload
- Description: Upload a
.zip
file containing folder with images. The server processes and groups them by face similarity. - Request Body:
multipart/form-data
- Field:
file
(type: File)
- Field:
- Response:
200 OK
with downloadable zipped file.
curl -X POST "http://127.0.0.1:8000/uploadfile" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "file=@/images_path.zip;type=application/x-zip-compressed"