An open API service indexing awesome lists of open source software.

https://github.com/scriptburn/person-matcher

AI-powered tool to detect and match people across multiple tourist photos using object detection, person re-identification, and similarity scoring. Built with Streamlit, TorchReID, and YOLOv8.
https://github.com/scriptburn/person-matcher

Last synced: 4 months ago
JSON representation

AI-powered tool to detect and match people across multiple tourist photos using object detection, person re-identification, and similarity scoring. Built with Streamlit, TorchReID, and YOLOv8.

Awesome Lists containing this project

README

          

# ๐Ÿงโ€โ™‚๏ธ Person Matcher AI

A Streamlit-based AI tool that detects and matches people across multiple images taken from different angles or devices โ€” ideal for tourist photos at places like the Taj Mahal.

[![License: Non-Commercial](https://img.shields.io/badge/license-non--commercial-blue.svg)](LICENSE)

---

## โœจ Features

- ๐Ÿ“ค Upload multiple images
- ๐Ÿง  Detect people using YOLOv8
- ๐Ÿงฌ Extract features via TorchReID
- ๐Ÿ“ˆ Visual match grouping based on cosine similarity
- ๐Ÿงฎ Auto or manual thresholding
- โœ… Label match results as correct/incorrect
- ๐Ÿ“ฆ Save labeled pairs for training dataset
- ๐Ÿ“ Export dataset for COCO/CSV training
- ๐Ÿณ Dockerized with Makefile for easy dev/prod workflows

---

## ๐Ÿ–ผ๏ธ Use Case

> Given Image A and Image B taken at the same place by two different people, the app identifies if both images contain the same individual โ€” even from different angles or cameras.

---

## ๐Ÿš€ Run Locally (Dev Mode)

```bash
make build
make dev
```

Then visit: [http://localhost:8501](http://localhost:8501)

---

## ๐Ÿ—๏ธ Project Structure

```
person-matcher/
โ”œโ”€โ”€ app/
โ”‚ โ”œโ”€โ”€ detector.py # Person detection (YOLOv8 or simulated)
โ”‚ โ”œโ”€โ”€ reid.py # Feature extraction and re-ID
โ”œโ”€โ”€ web/
โ”‚ โ””โ”€โ”€ app.py # Streamlit frontend
โ”œโ”€โ”€ data/
โ”‚ โ”œโ”€โ”€ crops/ # Saved validated crop pairs
โ”‚ โ””โ”€โ”€ labels/ # labels.jsonl with group metadata
โ”œโ”€โ”€ uploads/ # Temp uploaded images
โ”œโ”€โ”€ runtime_crops/ # Temp detection results
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ Makefile
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ .gitignore
```

---

## ๐Ÿ“ฆ Dataset Workflow

1. Upload multiple images
2. Confirm visually matched people
3. Save labeled data
4. Export dataset for training

---

## ๐Ÿ“ค Exporting

- Export labeled dataset to COCO or CSV for training (coming soon)
- Future: `make export-coco` or `make export-csv`

---

## ๐Ÿงช Tech Stack

- Streamlit
- YOLOv8 (Ultralytics)
- TorchReID
- NumPy + Scikit-learn
- Docker + Makefile

---

## ๐Ÿ“œ License

This project is licensed for **non-commercial use only**.

If you wish to use this software in a commercial product or service, please contact the author

---

## ๐Ÿ‘ฉโ€๐Ÿ’ป Author

Created by Rajneesh ojhaโ€” a passionate AI + Web developer from India ๐Ÿ‡ฎ๐Ÿ‡ณ
Drop a โญ if this project helped you!

---

## ๐Ÿ“„ License File

See the [LICENSE](LICENSE) file in this repository for full details.