Code Monkey home page Code Monkey logo

i3d-pytorchvideo's Introduction

I3D-PyTorchVideo

Reference: https://github.com/tianyu0207/RTFM https://pytorchvideo.org/docs/tutorial_torchhub_inference

Download an vieo for utils/utils.py test.

wget -c https://dl.fbaipublicfiles.com/pytorchvideo/projects/archery.mp4

Download UCF-Crime dataset.

Website: https://www.crcv.ucf.edu/projects/real-world/

The downloaded dataset is shown below:

├── Anomaly_Train.txt
├── Anomaly-Videos-Part-1.zip
├── Anomaly-Videos-Part-2.zip
├── Anomaly-Videos-Part-3.zip
├── Anomaly-Videos-Part-4.zip
├── config.yaml
├── Normal_Videos_for_Event_Recognition.zip
├── ReadMe-Anomaly-Detection.txt
├── Temporal_Anomaly_Annotation_for_Testing_Videos.txt
├── Testing_Normal_Videos.zip
├── Training-Normal-Videos-Part-1.zip
├── Training-Normal-Videos-Part-2.zip
└── UCF_Crimes-Train-Test-Split.zip

After deleting Normal_Videos_for_Event_Recognition.zip, unzip all the files and organize them, the directory tree is as follows:

.
├── Anomaly_Detection_splits
├── Anomaly_Train.txt
├── Anomaly-Videos-Part-1
├── Anomaly-Videos-Part-2
├── Anomaly-Videos-Part-3
├── Anomaly-Videos-Part-4
├── Temporal_Anomaly_Annotation_for_Testing_Videos.txt
├── Testing_Normal_Videos_Anomaly
├── Training-Normal-Videos-Part-1
└── Training-Normal-Videos-Part-2

Instructions:

Anomaly-Videos-Part-{1..4} is the abnormal dataset, which contains 950 anomaly videos.
    Anomaly_Train.txt : Division of the training set of anomalous videos.
    Temporal_Anomaly_Annotation_for_Testing_Videos.txt : Division of abnormal video testing set.

Testing_Normal_Videos_Anomaly, Training-Normal-Videos-Part-1, and Training-Normal-Videos-Part-2 are the abnormal dataset, which contains 950 normal videos. The training and test datasets have been divided.

Feature extract

python main.py

After feature extraction,the directory tree is as follows:

├── Abuse
├── Arrest
├── Arson
├── Assault
├── Burglary
├── Explosion
├── Fighting
├── RoadAccidents
├── Robbery
├── Shooting
├── Shoplifting
├── Stealing
├── Testing_Normal_Videos_Anomaly
├── Training-Normal-Videos-Part-1
├── Training-Normal-Videos-Part-2
└── Vandalism

Merge Testing_Normal_Videos_Anomaly, Training-Normal-Videos-Part-1, and Training-Normal-Videos-Part-2:

cd feature_extract
mkdir Normal_Videos_event
cp Training-Normal-Videos-Part-1/* Training-Normal-Videos-Part-2/* Testing_Normal_Videos_Anomaly/* Normal_Videos_event
rm -rf Training-Normal-Videos-Part-1 Training-Normal-Videos-Part-2 Testing_Normal_Videos_Anomaly

Attention: The train_normal.txt has some repeating elements in it!

Feature extract Success!

i3d-pytorchvideo's People

Contributors

pwzy avatar

Stargazers

 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.