Physical Violence Detection Android App (Key Framing + CNN, Java/XML + Firebase) | Tour2Tech
Home / Projects / Physical Violence Detection (Key Framing)
LIMITED OFFER
Get up to β‚Ή1,000 OFF
Use coupon MYProject when you book via WhatsApp/Call. We don’t sell online.
Android β€’ Computer Vision β€’ Firebase

Physical Violence Detection Using Key Framing (Android + CNN)

A production-ready violence detection android app built in Java/XML with Firebase Realtime Database. Users upload a video from the gallery; the app performs key frame extraction and runs a CNN to classify physical violence types like fight, kick, punch, gunshot. Results, scores, and timestamps appear with frame thumbnailsβ€”ready for reporting or academic evaluation.

  • βœ“Android Studio project (Java/XML), modular and well-documented
  • βœ“On-device TFLite CNN or server inference (switchable)
  • βœ“Frame gallery, per-class confidence, and exportable summaries
Delivery in 3–5 days β€’ Pan-India support
*Demo video placeholder. Replace with your link.
Project Objective

Deliver an accurate, efficient video violence detection app that turns long videos into representative key frames and classifies each segment using a CNN. Designed for academic projects, research demos, and proof-of-concepts where explainability (frame evidence + timestamps) matters.

How It Works
  1. Upload: Select a video from the gallery (MP4/AVI/MOV supported).
  2. Key Framing: Motion- and scene-change–based frame sampling extracts representative frames per interval.
  3. CNN Inference: Each key frame (or short clip) is resized/normalized and passed to a trained CNN (TFLite). Outputs class logits and confidence.
  4. Aggregation: Frame-level predictions are temporally smoothed to create segment labels (fight, kick, punch, gunshot, none).
  5. Report: Results with thumbnails, timestamps, and confidences are shown in-app and saved to Firebase for history.
Project Modules
Video Import & Preview

Pick from gallery, scrub timeline, preview frames.

  • MediaStore picker
  • Thumbnail extraction
  • Playback controls
Key Framing Engine

Adaptive sampling via motion/scene change.

  • Configurable interval
  • Edge/blur rejection
  • Fast bitmap pipeline
CNN Classifier (TFLite)

On-device inference; optional server switch.

  • Labels: fight/kick/punch/gunshot/none
  • Per-frame confidence
  • Threshold tuning
Results & Firebase

Store metadata, logs, and images securely.

  • Realtime DB + Storage
  • History & sharing
  • Auth-protected access
Firebase Realtime Database Structure (Example)
{
  "users": {
    "uid123": {"name":"Alex","email":"a@b.com"}
  },
  "videos": {
    "vid_17000001": {
      "owner":"uid123",
      "path":"gs://bucket/videos/vid_17000001.mp4",
      "durationSec": 92,
      "createdAt": 1725345600
    }
  },
  "analyses": {
    "vid_17000001": {
      "frames": [
        {"t": 2.1, "img":"gs://bucket/frames/vid_17000001/f_0021.jpg", "label":"none",   "conf":0.81},
        {"t": 18.6,"img":"gs://bucket/frames/vid_17000001/f_0186.jpg", "label":"punch",  "conf":0.74},
        {"t": 36.2,"img":"gs://bucket/frames/vid_17000001/f_0362.jpg", "label":"fight",  "conf":0.83}
      ],
      "summary": {
        "topClass":"fight",
        "timeline":[{"start":16.0,"end":40.0,"class":"fight"}]
      }
    }
  }
}
              
Sample Firebase Security Rules (High-Level)
// Realtime Database Rules (illustrative)
{
  "rules": {
    ".read": false,
    ".write": false,

    "users": {
      "$uid": {
        ".read": "$uid === auth.uid",
        ".write": "$uid === auth.uid"
      }
    },

    "videos": {
      "$vid": {
        ".read": "data.child('owner').val() === auth.uid",
        ".write": "auth != null && ( !data.exists() || data.child('owner').val() === auth.uid )"
      }
    },

    "analyses": {
      "$vid": {
        ".read": "root.child('videos/'+$vid+'/owner').val() === auth.uid",
        ".write": "root.child('videos/'+$vid+'/owner').val() === auth.uid"
      }
    }
  }
}
              
Tighten Storage rules similarly: only the owner can read/write their frames and video files.
Key Features & Benefits
  • Explainable output with frame thumbnails and timestamps.
  • Fast inference via key framing and on-device TFLite CNN.
  • Configurable labels & thresholds for your dataset.
  • Offline-firstβ€”queue logs and sync when online.
  • Secure Firebase Auth + Rules for private projects.
Android Integration Sketch (Java/XML)
// PSEUDO-CODE (illustrative)

// 1) Pick Video
void pickVideoFromGallery(){
  // ACTION_OPEN_DOCUMENT with video/*, persistable URI permission
}

// 2) Key Framing
List<Frame> extractKeyFrames(Uri video){
  // Use MediaMetadataRetriever to sample frames every N ms
  // Apply motion/scene change heuristic to keep representative frames
  // Return list of (bitmap, timestamp)
}

// 3) CNN (TFLite) Inference
Prediction runModel(Bitmap frame){
  // Resize to model input (e.g., 224x224), normalize
  // Interpreter.run(input, output)
  // Map logits -> labels {fight, kick, punch, gunshot, none}
}

// 4) Temporal Smoothing
List<SegmentLabel> smooth(List<Prediction> preds){
  // Sliding window majority + confidence threshold
}

// 5) Firebase Save
void saveAnalysis(String vidId, List<FrameResult> frames, Summary summary){
  // Write to /analyses/{vidId} and upload thumbnails to Storage
}
              
We provide a complete, working Android Studio project with organized packages, XML layouts, TFLite wiring, and Firebase setup.
What You Get
ItemIncludedNotes
Android Source Code (Java/XML)βœ…Clean architecture, comments, modular
Key Framing Engineβœ…Configurable sampling & heuristics
CNN (TFLite) Integrationβœ…Label mapping, thresholds, smoothing
Firebase Setupβœ…Auth + Realtime DB + Storage + Rules templates
Demo Videoβœ…Setup & working walkthrough
Report & PPTβœ…College-format templates
Supportβœ…Installation + viva Q&A (1 month)

FAQs β€” Violence Detection Android App

A Java/XML Android app that extracts key frames from uploaded videos and uses a CNN to classify physical violence types with confidence scores.

Yes. Inference can run on-device using TFLite; results sync to Firebase when online.

Yes. Retrain/replace the TFLite model and update the label map; the UI reads labels dynamically.

We use Firebase Authentication & Security Rules to restrict reads/writes to the video owner.

Why Students Choose Tour2Tech

Proven Quality

300+ projects delivered with top reviews & on-time submissions.

End-to-End Support

From setup to vivaβ€”demo videos, docs, and Q&A support.

Customization

Change model, labels, UI, or export formats easily.

Fair Pricing

Transparent kit + support model with coupon savings.

Project Buying Guide

01

Discuss Project Requirement

Connect with Yogesh Sir on Call or WhatsApp at +91 9172422245 for a free consultation. Get complete details on development and working.

02

Create a WhatsApp Group

Add your team to receive weekly updates, project source code, PPTs, and reports.

03

Advance Payment

Make 45% advance payment; remaining on completion. Invoice shared.

04

Project Demo & Teaching

Join a live demo with code explanation and recording. Minor changes included.

05

Installation & Support

We install & set up on your laptop and provide 1 month of support.

What Students Say

⭐⭐⭐⭐⭐ Trusted by 1000+ students

Real WhatsApp chats from students after delivery and submission. Add your screenshots below.

Review of violence detection android app project 1
Review of violence detection android app project 2
Review of violence detection android app project 3
Review of violence detection android app project 4

Looking for a placement-ready Computer Vision project?

Get the Physical Violence Detection App with code, demo, docs, and support.

WhatsApp Us Now
Shopping Cart
Scroll to Top