A: ImageOSINT requires:
- Python 3.9 or higher
- Docker & Docker Compose (for containerized deployment)
- PostgreSQL 15+ (recommended) or SQLite (development)
- Redis 7+ (for caching)
- 2GB+ RAM minimum
- Stable internet connection
A: Yes! Set DATABASE_TYPE=sqlite in .env. SQLite is great for development and small deployments. For production, PostgreSQL is recommended.
A: Not required, but highly recommended. For manual setup, you'll need to install and manage PostgreSQL, Redis, and Celery separately.
A:
git clone https://github.com/QusaiALBahri/imageOSINT.git
cd imageOSINT
pip install -r requirements-backend.txt
docker-compose -f docker-compose.dev.yml up -d
python -c "from database.init_db import init_db; init_db()"A: See the API Examples section in README. Quick example:
import requests
BASE_URL = "http://localhost:8000"
# Register
response = requests.post(f"{BASE_URL}/api/auth/register", json={
"email": "user@example.com",
"username": "testuser",
"password": "SecurePass123!"
})
token = response.json()["access_token"]
# Submit analysis
response = requests.post(
f"{BASE_URL}/api/analyze",
headers={"Authorization": f"Bearer {token}"},
files={"file": open("image.jpg", "rb")}
)A: Currently supported formats:
- JPEG / JPG
- PNG
- GIF
- WebP
- BMP
Maximum file size: 100MB (configurable in .env)
A: Accuracy depends on image metadata quality:
- Excellent: If image has GPS coordinates (±10 meters)
- Good: If image has partial EXIF data (±100 meters)
- Fair: If reverse geocoding from address (±500 meters)
- Poor: If no metadata present
A: Currently, submit one image per job. For batch processing, implement a loop:
for image_file in os.listdir("images/"):
# Submit each image
requests.post(f"{BASE_URL}/api/analyze", ...)Batch API is planned for v1.1.
A: Typical timing:
- Metadata extraction: ~100ms
- Reverse search: 2-3s per engine (3 engines = parallel)
- Location analysis: 1-2s
- Maps scraping: 2-3s
- Total: 8-12 seconds (parallelized)
- Cached result: <100ms
A: Yes! ImageOSINT is built for horizontal scaling:
-
Add more workers:
docker-compose up -d --scale worker=4 # 4 workers -
Use load balancer (Nginx):
upstream api { server api:8000; }
-
Enable Redis clustering for production
-
Use database replication
See DEPLOYMENT.md for details.
A: Use the Flower dashboard:
http://localhost:5555
Features:
- Task execution monitoring
- Worker status
- Performance metrics
- Real-time statistics
A: Depends on usage patterns:
- Identical images: ~90%+ hit rate (cache hit <100ms)
- Similar images: ~30% hit rate
- Unique images: 0% hit rate
Configure cache TTL in .env:
- Search results: 24 hours
- Location/maps: 7 days
A: Use the admin panel or API:
curl -X POST http://localhost:8000/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "bot@example.com",
"username": "bot",
"password": "StrongPassword123!"
}'Then use the returned token as Bearer token.
A: Update .env:
JWT_SECRET=your_new_super_secret_key_min_32_chars
JWT_ALGORITHM=HS256
TOKEN_EXPIRY=1800 # 30 minutesRestart services:
docker-compose down
docker-compose up -dA:
- In transit: Configure HTTPS/TLS
- At rest: Use encrypted database connections
- Passwords: Bcrypt hashing with salt
- Database: Data stored unencrypted by default (configure encryption as needed)
See SECURITY.md for complete security info.
A: Configure Nginx reverse proxy with Let's Encrypt:
See DEPLOYMENT.md for detailed steps.
A: Ensure services are running:
# Check status
docker-compose ps
# View logs
docker-compose logs -f api
# Restart services
docker-compose restartA: Verify database is running:
# Check PostgreSQL
docker-compose ps postgres
# Test connection
psql -U osint_user -d osint_db -h localhostA: Check Celery workers:
# View workers
celery -A tasks.celery inspect active
# Check queue length
celery -A tasks.celery inspect reserved
# Monitor with Flower
http://localhost:5555A: Fix directory permissions:
chmod -R 755 uploads/
chmod -R 755 outputs/Or use Docker (handles automatically).
A: Optimize worker configuration:
# In .env
WORKERS_COUNT=2 # Reduce from 4
CELERY_WORKER_CONCURRENCY=2Then restart:
docker-compose restart workerA:
# PostgreSQL backup
docker-compose exec postgres pg_dump -U osint_user osint_db > backup.sql
# Redis backup
docker-compose exec redis redis-cli BGSAVE
# File backups
tar -czf uploads_backup.tar.gz uploads/A:
# PostgreSQL restore
docker-compose exec postgres psql -U osint_user osint_db < backup.sql
# Redis restore
docker-compose cp dump.rdb redis:/data/
docker-compose restart redisA: Yes! Production checklist:
- Change all default passwords
- Update JWT_SECRET to 32+ char random string
- Enable SSL/TLS
- Configure proper CORS origins
- Set up log aggregation
- Configure monitoring and alerts
- Set up automated backups
- Enable rate limiting
- Use strong database passwords
- Enable Redis authentication
See DEPLOYMENT.md for production guide.
A:
# Pull latest code
git pull origin main
# Update dependencies
pip install -r requirements-backend.txt --upgrade
# Restart services
docker-compose down
docker-compose build
docker-compose up -dA: Yes! Use the REST API:
import requests
api_client = requests.session()
api_client.headers.update({
"Authorization": f"Bearer {your_token}",
"Content-Type": "application/json"
})
# Use any endpoint on http://localhost:8000/api/*A: Yes! Create a module in modules/:
# modules/custom_analyzer.py
class CustomAnalyzer:
def analyze(self, image_path):
# Your custom logic
return resultsThen add a Celery task for it.
A: Absolutely! Edit app_backend.py:
# Add your own Gradio interfaces
# Deploy to frontend port 7860A: See CONTRIBUTING.md for detailed guidelines. Quick start:
- Fork repository
- Create feature branch
- Make changes and test
- Submit pull request
A:
- Security issues: SECURITY.md
- Regular bugs: GitHub Issues
- Questions: GitHub Discussions
- 📖 Read README.md
- 📚 Check DEPLOYMENT.md
- 🏗️ Review BACKEND_SETUP.md
- 💬 Open GitHub Discussion
- 📧 Contact maintainers
Last Updated: April 13, 2024