-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadme.txt
32 lines (26 loc) · 1.78 KB
/
Readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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.
2. 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.
3. 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.
4. 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).
5. 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.