Coder Social home page Coder Social logo

Comments (3)

WaqasSultani avatar WaqasSultani commented on July 3, 2024 2

Given the video, we take pre-trained C3D network and compute features with the default settings (4096 D vector for every 16 frames).
If video 1 has 1600 frames it should be having (1600/16) = 100 clips of 16 frame video clips.
For this video, we would have 100 (4096D) vectors.
After that, we use the linspace function in Matlab to divide 100 vectors into 32 segments ( Please have a look at the code here: https://github.com/WaqasSultani/AnomalyDetectionCVPR2018/blob/master/Save_C3DFeatures_32Segments.m)

Overall the code is something like this:
clc

thirty2_shots= round(linspace(1,100,33))

segments_indexes=[]

for ishots=1:length(thirty2_shots)-1

    ss= thirty2_shots(ishots);

    ee= thirty2_shots(ishots+1)-1;

    segments_indexes=[segments_indexes;[ss ee]]

end

The output of this code is:

 1     3
 4     6
 7     9
10    12
13    15
16    19
20    22
23    25
26    28
29    31
32    34
35    37
38    40
41    43
44    46
47    50
51    53
54    56
57    59
60    62
63    65
66    68
69    71
72    74
75    77
78    80
81    84
85    87
88    90
91    93
94    96
97    99

So the segment 1 would be an average of features 1, 2 and 3. Segment 2 would be an average of features 4, 5 and 6 and so on.

from anomalydetectioncvpr2018.

WurmD avatar WurmD commented on July 3, 2024

Thank you kindly for this clarification.

Would you elaborate on the case where the video has less than 512 frames (i.e., Normal_Videos_006_x264 has 450 frames)?

For 450 frames were only 28 clips produced?

from anomalydetectioncvpr2018.

WurmD avatar WurmD commented on July 3, 2024

I installed MATLab and tried it, and for smaller videos, each of the 32 segments will use the features of only 1 of the 16 frame clips, and several segments will use the same clip

If the video only has 160 frames (10 clips), the output is

 1     1
 1     1
 2     2
 2     2
 2     2
 2     2
 3     3
 3     3
 3     3
 4     4
 4     4
 4     4
 4     4
 5     5
 5     5
 5     5
 6     6
 6     6
 6     6
 6     6
 7     7
 7     7
 7     7
 7     7
 8     8
 8     8
 8     8
 9     9
 9     9
 9     9
 9     9
10    10

from anomalydetectioncvpr2018.

Related Issues (20)

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.