Hackathon Project for Junction 2025
Developed for Al-Insan Al-Jazairi Association to manage Qurbani (sacrifice) donations from Algerian donors to African communities.
Qurbani is an innovative AI-powered platform that automates the validation and management of sacrifice videos for charitable organizations. The platform ensures transparency and trust between donors and recipients by providing automated verification of sacrifice rituals through advanced computer vision and natural language processing.
- ๐ Sacrifice Detection: AI-powered detection of animals, people, and ritual elements in videos
- ๐ค Donor Mention Verification: Voice recognition to confirm donor name mentions during the ritual
- ๐ฉธ Blood Blurring: Automatic blood detection and blurring for sensitive viewers
- ๐ค Multilingual Chatbot: AI assistant supporting Arabic, French, and English for donor inquiries
- โ๏ธ Cloud Integration: Seamless video processing and storage with Cloudinary
- โก Real-time Processing: Kafka-based message queuing for scalable video processing
The platform consists of several AI-powered microservices:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ FastAPI API โโโโโโ Kafka Queue โโโโโโ AI Video Pipelineโ
โ โ โ โ โ โ
โ โข REST Endpointsโ โ โข Message Queue โ โ โข YOLO Detectionโ
โ โข Chatbot โ โ โข Task Manager โ โ โข Whisper STT โ
โ โข File Upload โ โ โข Async Proc. โ โ โข Blood Blurringโ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโ
โ Cloudinary โ
โ Video Storage โ
โโโโโโโโโโโโโโโโโโโ
View our diagrams View our technical file
- Python 3.8+
- FFmpeg installed on system
- Kafka server running
- Cloudinary account
- Google AI API key
- Clone the repository
git clone <repository-url>
cd qurbani- Install dependencies
pip install -r requirements.txt- Set up environment variables
# Edit .env with your configuration
Required environment variables:
```env
# Kafka Configuration
KAFKA_SERVERS=localhost:9092
# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Google AI (for chatbot)
GOOGLE_API_KEY=your_google_ai_api_key- Initialize the chatbot knowledge base
cd chatbot-assistant/scripts
python data_embadding.py- Start the application
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000
GET /Returns server status.
POST /process-video
Content-Type: application/json
{
"donor_id": "12345",
"first_name": "Ahmed",
"last_name": "Benali",
"video_link": "https://res.cloudinary.com/..."
}Response:
{
"is_audhia": true,
"donor_mentioned": true,
"match_score": 0.95,
"transcript": "Bismillah, this sacrifice is for Ahmed Benali...",
"blurred_video_url": "https://res.cloudinary.com/.../blurred_video.mp4"
}POST /ask
Content-Type: application/json
{
"question": "ููู ูู
ูููู ุงูุชุฃูุฏ ู
ู ุตุญุฉ ุงูุฐุจูุญุฉุ"
}Response:
{
"answer": "ูุชู
ุงูุชุญูู ู
ู ุตุญุฉ ุงูุฐุจูุญุฉ ู
ู ุฎูุงู ุงูุฐูุงุก ุงูุงุตุทูุงุนู ุงูุฐู ูุญูู ุงูููุฏูู..."
}- Technology: YOLO v8
- Purpose: Detects people, sheep, and knives in video frames
- Output: Boolean indicating valid sacrifice scene
- Technology: Faster Whisper
- Purpose: Transcribes audio and matches donor names
- Features: Fuzzy matching with confidence scores
- Technology: OpenCV color detection
- Purpose: Automatically blurs blood in videos
- Method: HSV color space filtering and Gaussian blur
- Technology: Sentence Transformers + Google Gemini
- Languages: Arabic, French, English
- Features: Context-aware responses using FAISS vector search
qurbani/
โโโ app/ # FastAPI application
โ โโโ main.py # Application entry point
โ โโโ routes/ # API route handlers
โโโ blood-detector/ # Blood blurring module
โโโ chatbot-assistant/ # AI chatbot system
โโโ mention-detector/ # Voice recognition module
โโโ object_detector/ # YOLO-based detection
โโโ requirements.txt # Python dependencies
- Extend AI Pipeline: Add new detection modules in respective directories
- API Routes: Create new endpoints in
app/routes/ - Chatbot Knowledge: Update
chatbot-assistant/dataset/context.json - Message Queue: Add new Kafka topics for additional processing
# Run API tests
pytest tests/
# Test individual AI components
python object_detector/scripts/video_checker.py
python mention-detector/scritps/mention.pyThe platform supports three languages:
- Arabic (ุงูุนุฑุจูุฉ): Primary language for North African donors
- French (Franรงais): Common language in West African regions
- English: International communication
Language detection is automatic based on input text patterns and keywords.
- sacrificer uploads sacrifice video via mobile app
- pushed to kackend via kafka
- backend upload it on cloudinary
- AI pipeline processes video for authenticity
- System verifies donor name mention in audio
- Blood is automatically blurred for sensitive viewers
- Organization receives verified videos
- Dashboard shows processing status
- Failed verifications flagged for manual review
- Statistics and reports generated for transparency
- Donors ask questions via chatbot
- Multilingual AI provides instant answers
- Complex queries escalated to human support
- Knowledge base continuously updated
video.process.start: Triggers video processing pipelinevideo.process.complete: Notifies completion of processing
- YOLO: Pre-trained YOLOv8x for object detection
- Whisper: Base model for speech recognition
- Sentence Transformers: Multilingual MiniLM for embeddings
- Gemini: Google's LLM for conversational responses
The platform is designed for cloud deployment with:
- API: Can be deployed on any container platform (AWS ECS, Google Cloud Run)
- Kafka: Use managed services (AWS MSK, Confluent Cloud)
- Storage: Cloudinary for video storage and CDN
- Video Processing: ~30-60 seconds per 2-minute video
- Sacrifice Detection: 95%+ accuracy on test dataset
- Voice Recognition: 90%+ accuracy for clear audio
- Chatbot Response: <2 seconds average response time
Junction 2025 Submission
- Team: --force
- Track: Social Impact / AI Track
- Partner: Al-Insan Al-Jazairi Association
- Al-Insan Al-Jazairi Association for these efforts
- Junction Hackathon organizers
Built with โค๏ธ during Junction 2025 Hackathon to serve the Muslim community and promote transparency in charitable giving.