AI-driven search engine for locating missing patients in healthcare institutions using hybrid facial recognition and textual analysis.
IAPEX (Inteligencia Artificial para la Localización de Pacientes Extraviados en Instituciones de Salud) is a validated and robust system designed to address a critical problem: identifying unlocated or unidentified patients within healthcare institutions.
This repository contains the Search API — the AI engine that combines facial recognition via CNN and advanced textual analysis to identify patients with high precision.
| Component | Repository | Stack |
|---|---|---|
| Search API (this) | iapex-org/search-api | FastAPI, Python 3.11, MongoDB |
| Mobile App | iapex-org/mobile-app | React, Ionic |
| Web Portal | iapex-org/web-app | Angular, Bootstrap |
| Core API | iapex-org/core-api | Spring Boot, PostgreSQL |
- Facial Recognition — CNN based on dlib with 128-dimensional embeddings
- Textual Analysis — Levenshtein and Jaro-Winkler algorithms for matches
- Hybrid Search — combines facial recognition (75%) and textual analysis (25%)
- Smart Cache — face encodings in MongoDB for fast comparisons
- Ad-hoc Search — searches with manually entered data
- Validated System — 100% sensitivity (zero false negatives) in 3,720 evaluations
- Async API — async/await architecture for maximum performance
- Interactive Docs — Swagger UI and ReDoc built-in
| Mode | Description | Validated Precision |
|---|---|---|
text |
Text-only (name, gender, physical description) | 96.8% effectiveness |
image |
Facial recognition only via CNN | 100% precision |
hybrid |
Optimal combination: text (25%) + image (75%) | 100% precision |
- Python 3.11+
- PostgreSQL 14+
- MongoDB 6.0+
- CMake and C++ compilers (for dlib)
git clone https://github.com/iapex-org/search-api.git
cd search-api
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .envConfigure your values in .env, then:
python run.pyThe API will be available at http://localhost:8000
┌─────────────────────────────────────────────────┐
│ Client Apps │
│ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ Mobile App │ │ Web Portal │ │
│ └──────┬──────┘ └───────────┬─────────────┘ │
└─────────┼─────────────────────┼─────────────────┘
│ │
┌─────────▼─────────────────────▼─────────────────┐
│ API SEARCH (FastAPI) │
│ ┌──────────┐ ┌──────────┐ ┌────────────────┐ │
│ │ Facial │ │ Text │ │ Hybrid │ │
│ │ Recog. │ │ Matcher │ │ Engine │ │
│ │ (dlib) │ │(Levensh.)│ │ (75/25 mix) │ │
│ └────┬─────┘ └────┬─────┘ └───────┬────────┘ │
│ │ │ │ │
│ ┌────▼────────────▼───────────────▼────────┐ │
│ │ Cache Layer (MongoDB) │ │
│ └────────────────┬─────────────────────────┘ │
└───────────────────┼─────────────────────────────┘
│
┌─────────▼─────────┐
│ PostgreSQL │
│ (Patient Data) │
└───────────────────┘
Please read CONTRIBUTING.md for branch naming, commit conventions, and PR workflow.
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.
Authors:
- Altamirano Misrael Florentino
- Ortiz Pérez Alejandro
- Serrano Puertos Jorge Christian
Advisors:
- Escobar García Arturo
Academic Support:
- Universidad Tecnológica del Centro de Veracruz