Documentation
Getting Started
Requirements: Python 3.8+, Flask, SQLite
Quick Setup:
git clone https://github.com/ahmedmsayeem/Face_Search.git
cd Face_Search
pip install -r requirements.txt
python app.py
Endpoints
1. Upload Image by URL
- Endpoint:
/upload-url-image
POST - Parameters:
url
(string, required): link to the imagecategory
(string, optional): category name
{
"success": true,
"message": "Image uploaded successfully",
"url": "https://example.com/image1.jpg",
"category": "event1"
}
Example Calls
curl
curl -X POST http://localhost:5000/upload-url-image \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/image1.jpg","category":"event1"}'
JavaScript (fetch)
fetch('http://localhost:5000/upload-url-image', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
url: "https://example.com/image1.jpg",
category: "event1"
})
}).then(res => res.json()).then(console.log);
Python (requests)
import requests
resp = requests.post(
"http://localhost:5000/upload-url-image",
json={"url": "https://example.com/image1.jpg", "category": "event1"}
)
print(resp.json())
2. Check Similar Image
- Endpoint:
/check-url-image
POST - Parameters:
url
(string, required): link to the image to comparecategory
(string, optional): limit search within category
{
"match": true,
"urls": [
"https://example.com/event1/pic1.jpg",
"https://example.com/event1/pic2.jpg"
]
}
Example Calls
curl
curl -X POST http://localhost:5000/check-url-image \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/image1.jpg","category":"event1"}'
JavaScript (fetch)
fetch('http://localhost:5000/check-url-image', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
url: "https://example.com/image1.jpg",
category: "event1"
})
}).then(res => res.json()).then(console.log);
Python (requests)
import requests
resp = requests.post(
"http://localhost:5000/check-url-image",
json={"url": "https://example.com/image1.jpg", "category": "event1"}
)
print(resp.json())
More Endpoints (Coming Soon)
Advanced usage, authentication, batch search — coming soon!
Examples
See above for full usage examples for each endpoint in curl
, JavaScript (fetch
), and Python (requests
).