GithubHelp home page GithubHelp logo

abhishish3960 / crowd-anomaly-detection Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 17 KB

In this project, we propose a novel method for unusual human activity detection in crowded scenes. Specifically, rather than detecting or segmenting humans, we devised an efficient method, called a motion influence map, for representing human activities.

Python 100.00%

crowd-anomaly-detection's Introduction

CROWD ANOMALY DETECTION

  1. Optical flow of blocks (optFlowofblocks.py)

The module optical flow of blocks is provided with a frame and the optical flow of a frame. It divides the frame into blocks of size m x n and sums all the optical flows in each block and returns it along with details like m, n, size and center of blocks.

  1. Motion Influence Generator (motionInfluenceGenerator.py)

This module is provided with training or testing video and it calculates the motion influence map for each frame in that video and also returns the size of the blocks in the motion influence map.

  1. Megablock Generator (createMegaBlocks.py)

This module has 2 functionalities.

a) Generating megablocks and returning them (testing) Megablocks are generated by grouping motion influence blocks into a bigger sized blocks as motions of closely situated blocks are similar.

A set of megablocks of size (number of frames * number of megablocks in each row * number of megablocks each column) is returned.

b) Generating megablocks and returning codewords (training) After repeating the above process but before returning the set of megablocks, each set of megablocks present in the same frame position is applied kmeans clustering on and the means called codewords are only returned to the calling module.

  1. Training module (training.py)

Training module calls motion influence generator and megablock generator to obtain codewords on a training video input. It then stores codewords in a .npy(NumPY file).

  1. Testing module (testing.py)

Testing module calls motion influence generator and megablock generator to obtain megablocks on a testing video input. It then constructs a minimum distance matrix after loading the stored codewords, checks if a megablock is unusual by comparing it against a threshold value and displays unusual megablocks and frames.

Datset Description

UMN: Crowd Escape Panic, 11 Videos, 3 Scenes, Videos: a normal starting section and an abnormal ending section. We parcelled each edge into 8ร—8 non overlapping squares, and set the edge to the most extreme highlight an incentive in the movement impact guides of the preparation pictures. The basis for this methodology is that we expect the unusual exercises to bring about higher movement impact esteems than the typical exercises.

Peds1: clasps of gatherings of individuals strolling towards and away from the camera, and some measure of point of view mutilation. Contains 34 preparing video tests and 36 testing video tests.

Peds2: scenes with passer by development corresponding to the camera plane. Contains 16 preparing video tests and 12 testing video tests.

image

Language: Python

Tools: Numpy, OpenCV2

Database/Datasets: UMN,ย  Peds1, Peds2.

Limitations of The Solution

The proposed method has a limitation when there is a strong perspective distortion in the input video as the motion influence map is built based on the motion direction and magnitude of the moving objects. However, the main focus of this work is to detect unusual activities within a crowded scene, for which the cameras usually cover a wide area, resulting in small objects being present in the scene without significant perspective changes.

crowd-anomaly-detection's People

Contributors

abhishish3960 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.