How smartwolly5-afk/5_final works
TANK is a Flask/MySQL prototype for video-derived armored-vehicle threat assessment and a separate tank-specification dictionary. The principal workflow accepts detections, aggregates frame-level tracks, classifies known/variant/unknown vehicles, computes threat and cluster response levels, then serves dashboard APIs and reports; unknown sightings can be grouped across videos. The dictionary independently serves searchable country, family, and variant views from tank_specs. The graph follows README documentation and shown imports/calls; several dashboard internals are only partially excerpted, so uncertain links are omitted.
Main entry points: __init__.py Dashboard routes · app.py Flask app · pipeline.py Analysis pipeline · dictionary.py Dictionary routes
Components 25
Web application
- Flask app
app.py - Dashboard routes
dashboard/__init__.py - Dashboard UI
dashboard/templates/dashboard - Dashboard client
dashboard/static/dashboard.js - Report view
dashboard/templates/dashboard/report.html - Unknown browser
dashboard/static/unknowns.js - Threat API
threat_api.py
Threat analysis
- Analysis pipeline
dashboard/threat/pipeline.py - Track aggregation
dashboard/threat/track.py - Vehicle identification
dashboard/threat/judge.py - Vehicle threat score
dashboard/threat/core.py - Response adapter
dashboard/threat/adapter.py - Cluster response level
response_level.py - Track crops
dashboard/media.py - Unknown registry
dashboard/unknown_registry.py
Persistence
- Threat data access
threat_db.py - MySQL / SQLite
- MySQL access
db.py - Tank specifications
schema.sql - Threat records
schema_threat.sql
Tank dictionary
- Dictionary routes
dictionary.py - Dictionary pages
templates/dictionary - Dictionary threat calculations
threat_calc.py
Other components
- Analyst
- Detector input
Connections 29
- Analyst → Flask app: uses
README.md - Detector input → Dashboard routes: submits detections
dashboard/__init__.py - Flask app → Dashboard routes: registers routes
app.py - Flask app → Dictionary routes: registers routes
app.py - Flask app → Threat API: registers routes
app.py - Dashboard routes → Analysis pipeline: analyzes payload
dashboard/__init__.py - Analysis pipeline → Track aggregation: aggregates tracks
dashboard/threat/pipeline.py - Analysis pipeline → Vehicle identification: judges tracks
dashboard/threat/pipeline.py - Vehicle identification → Vehicle threat score: scores vehicles
dashboard/threat/judge.py - Analysis pipeline → Response adapter: adapts results
dashboard/threat/pipeline.py - Response adapter → Cluster response level: assesses clusters
dashboard/threat/adapter.py - Dashboard routes → Track crops: saves representative crops
dashboard/__init__.py - Dashboard routes → Unknown registry: stores unknown sightings
dashboard/__init__.py - Unknown registry → Threat data access: reads and writes
dashboard/unknown_registry.py - Dashboard routes → Dashboard UI: renders
README.md - Dashboard UI → Dashboard client: loads client
README.md - Dashboard client → Dashboard routes: calls analysis APIs
README.md - Dashboard routes → Report view: renders report
README.md - Unknown browser → Dashboard routes: uses unknown APIs
dashboard/__init__.py - Threat API → Cluster response level: uses response rules
threat_api.py - Threat API → Threat data access: reads threat data
threat_api.py - Cluster response level → Threat data access: records assessments
response_level.py - Threat data access → MySQL / SQLite: connects
threat_db.py - Dictionary routes → MySQL access: queries data
dictionary.py - Dictionary routes → Dictionary threat calculations: uses calculations
dictionary.py - Dictionary routes → Dictionary pages: renders pages
README.md - MySQL access → MySQL / SQLite: opens connection
db.py - MySQL / SQLite → Tank specifications: stores specifications
README.md - MySQL / SQLite → Threat records: stores assessment records
README.md