AI / MLAI & MLAppsThesis

AI / ML system

Crime Scene Analytics (Deep Learning) logo

Crime Scene Analytics (Deep Learning)

M.Tech Thesis · Nirma University (24MCD008) · Guided by Dr. Sharada Valiveti

End-to-end forensic CV system: merge & clean crime-scene datasets, selectively super-resolve tiny evidence with Real-ESRGAN, train YOLOv8 for weapons + bloodstains, then ship Streamlit + Android (WebSocket) tools that also measure evidence-to-evidence distance.

Thesis: mAP@50 0.61 · forensic CV pipeline
Train
Inference
Crime Scene Analytics (Deep Learning) preview
Output

Model pipeline

Research → result

Lab-style panels for training, inference, and outputs.

Crime Scene Analytics (Deep Learning) shot 1
Crime Scene Analytics (Deep Learning) shot 2
Crime Scene Analytics (Deep Learning) shot 3
Crime Scene Analytics (Deep Learning) shot 4
Crime Scene Analytics (Deep Learning) shot 5

System design

Overview

Crime-scene investigators still skim hundreds of photos by hand — easy to miss a distant knife or faint blood droplet. This M.Tech thesis builds a data-centric detection pipeline (not just another YOLO fine-tune) that cleans annotations, enhances only small evidence regions, augments for forensic conditions, and deploys the trained detector into analyst-facing web and Android apps.

What I built

  • Merged Roboflow weapons (1,035) + bloodstain (326) datasets into a validated YOLO set (~1,283 images)
  • Noise reduction (Gaussian / median / NLM) without breaking box geometry
  • Selective 2× Real-ESRGAN on small evidence crops with Lanczos reintegration
  • Domain augmentations: Mosaic, MixUp, copy-paste, fog/rain/shadow/blur/occlusion → ~3,848 effective samples
  • YOLOv8 n/s/m comparison with mAP, precision, recall, and confusion analysis
  • DCGAN 64×64 synthetic weapons as a proof-of-concept for rare-class expansion
  • Streamlit app: upload scene, pick weights, draw boxes + confidence, measure distances
  • Android companion: live WebSocket inference + evidence distance visualization

What's unique

  • Selective Real-ESRGAN: enhance only boxes < 48×48px, then paste back without shifting labels
  • Annotation error rate cut from 4.8% → 0.6%; class-balance entropy 0.63 → 0.99
  • Same YOLOv8 family: mAP@50 0.53 → 0.61 and small-object mAP@50 0.41 → 0.54 from data quality alone
  • Spatial forensic assist: centroid Euclidean distance between detected evidence instances
  • Dual deployment: Streamlit lab UI + Kotlin Android client over WebSocket inference

Why it matters

  • Shows AI as a forensic assistant — faster triage, fewer missed small objects
  • Proves data-centric gains beat chasing model size for niche domains
  • Bridges research notebook → usable product surfaces analysts can click

Measured gains

Results that matter

Same model family — gains come from forensic-grade data engineering, not architecture tricks.

0.61

mAP@50

vs 0.53 on raw data — same detector family

0.87

Recall

up from 0.79 after preprocessing

0.54

Small-object mAP@50

from 0.41 via selective Real-ESRGAN

0.6%

Annotation errors

cleaned from 4.8% malformed boxes

0.81

Noisy-image recall

vs 0.68; fewer false positives / image

0.99

Class entropy

near-balanced weapon vs blood distribution

1.2k→3.8k

Dataset size

validated images → augmented training set

2

Evidence classes

weapon + bloodstain / splatter

Figures & graphs

See the pipeline clearly

Architecture, selective Real-ESRGAN, YOLO detections, training curves, and mobile/web deployments.

System architecture
System architectureFull crime-scene analytics flow from datasets to mobile/web clients.
YOLOv8 backbone
YOLOv8 backboneSingle-stage detector used for real-time forensic inference.
Selective Real-ESRGAN
Selective Real-ESRGANTiny evidence crops enhanced 2× then reintegrated without moving boxes.
Before / after enhancement
Before / after enhancementPerceptual detail recovered for distant weapons and faint stains.
Mosaic augmentation
Mosaic augmentationCrime-scene-aware composition diversity during training.
Copy-paste augmentation
Copy-paste augmentationEvidence instances pasted into new contexts to harden detection.
YOLO detections
YOLO detectionsWeapons and bloodstains localized with confidence scores.
Confusion matrix
Confusion matrixNormalized validation confusion across weapon / blood / background.
Precision–Recall curve
Precision–Recall curveBox PR curve from the validation run.
F1–confidence curve
F1–confidence curveOperating-point tradeoff for forensic triage thresholds.
Precision curve
Precision curvePrecision vs confidence on held-out validation images.
Recall curve
Recall curveRecall vs confidence — critical for not missing evidence.
Validation predictions
Validation predictionsModel predictions on a validation batch.
Evidence distance
Evidence distanceCentroid-to-centroid Euclidean distance between detections.
Streamlit analyst UI
Streamlit analyst UIUpload a scene, choose weights, visualize boxes and distances.
Android companion
Android companionOn-device UX talking to the WebSocket inference backend.
WebSocket bridge
WebSocket bridgeMobile client ↔ inference server architecture.
DCGAN synthetic weapons
DCGAN synthetic weapons64×64 proof-of-concept for rare-class synthetic expansion.

Read the work

Thesis, report & paper

Full write-ups for reviewers and collaborators — conference paper is a draft (not yet published).

Craft

How the intelligence was built

YOLOv8Real-ESRGANPyTorchUltralyticsAlbumentationsRoboflowDCGANStreamlitAndroidKotlinWebSocketOpenCVGoogle Colab

Open the research

Explore Crime Scene Analytics (Deep Learning)