How saranambiar/nirikshan-sahai works
Project Type & Purpose
• Nirikshan SahAI is a full-stack web application with integrated AI/ML pipelines.
• It uses Django as the primary backend framework (apps: aicte_admin, core, inspector, institute, etc.), serves HTML/CSS/JS frontend, orchestrates multiple AI services (document analysis, image inspection, anomaly detection, GenAI reporting), and offers REST endpoints via FastAPI.
File Structure
– Top-level “inspection_system” directory: the Django project (settings, URLs, WSGI/ASGI).
– Django apps:
• aicte_admin – admin dashboard and controls
• inspector – inspector‐specific views & forms
• institute – institute‐specific views & forms
• core – shared models, views, URLs
– “templates” and “static” directories: frontend assets (HTML, CSS).
– “media”: file uploads (documents, images, reports).
– Standalone scripts and notebooks:
• GenAI-Model folder (BERT, notebooks, main.py)
• Anomaly_Detection and AICTE_Region_Norms notebooks and outputs
• fastapi_app.py – ML inference endpoints (YOLOv8, custom CNNs in Endpoints/CNNs)
• final_certificate_verification.py
– Database: SQLite (db.sqlite3) for prototyping (models defined in each app).
README Insights
• Multi-stage workflow: document upload → AI verification → image inspection → anomaly detection → report generation → region mapping → role-based dashboards
• Technologies: TAPAS LLM + OCR, YOLOv8 + custom CNNs, Isolation Forest, GenAI for summaries, Django + FastAPI
Main Components & Their Interactions
A. Frontend Layer (Browser/UI)
– HTML templates (templates/) + CSS/JS (static/)
– Role-based UIs: inspector, institute, admin dashboards
B. Web Backend (Django Monolith)
– Handles authentication, routing, form processing, REST views
– Persists state in SQLite (or a production RDBMS)
– Saves uploaded docs/images to media/
– Orchestrates ML tasks (calls scripts or HTTP APIs)
C. ML Inference Service (FastAPI)
– fastapi_app.py loads YOLOv8 (yolov8l.pt) and CNN models (washroom.h5)
– Exposes HTTP endpoints for image classification/detection
D. AI/ML Modules
1. Document Analysis: TAPAS LLM + OCR pipelines (triggered via Python scripts or Django-Celery tasks)
2. Image Inspection: YOLOv8 + custom CNN via FastAPI or local import
3. Anomaly Detection: Isolation Forest implemented in Anomaly_Detection/anomaly.py
4. GenAI Reporting: BERT‐based summarization and Q&A (GenAI-Model/main.py)
5. Region Mapping & Norms: Jupyter notebooks in AICTE_Region_Norms generate maps and CSV outputs
E. Data Stores & Artifacts
– Relational data: SQLite
– Uploaded assets & generated reports: media/
– Static reports & HTML exports: Anomaly_Detection/*.html, AICTE_Region_Norms/*.html
Architectural Patterns & Design Principles
• MVC (Django): models (core/models.py, inspector/models.py, etc.), views, templates
• Service Separation: monolith for business logic + microservice for heavy ML inference (FastAPI)
• Pipeline Pattern: sequential AI modules (doc analysis → image analysis → anomaly detection → reporting)
• Role-Based Access Control: distinct URL namespaces and templates for admins, inspectors, institutes