A novel static anomaly detector using predicted RGB video frames.
Explore the docs »
View Demo
.
Report Bug
.
Request Feature
- About the Project
- Built With
- Getting Started
- Usage
- Roadmap
- Contributing
- License
- Authors
- Acknowledgements
Next frame anomaly detector is a GAN (Generative Adversarial Network) based implementation of a video frame predictor for anomaly detection. It is mainly used for detecting static anomalies of various kinds. This is due to the various kinds of losses used in the model.
Losses:
- Optical flow loss
- Adversarial loss
- Intensity loss
- Gradient loss
The main idea of this is comparing the next predicted (normal) frame with the actual anomalous frame and comparing and thresholding the losses. Each of the loss corresponds to a different kind of anomaly.
Built in python. ML frameworks like Tensorflow and Keras were majorly used. An implementation of FlowNet2 was used for calculating the flow of the images.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Get the checkpoints for running the flownet from this Link Download the entire folder and put it in the same directory.
In utils.py
data_dir = "your_folder\\training\\frames"
test_dir = "your_folder\\testing\\frames"
In train.py
gan.train(train_gen, epochs=600, batch_size=batch_size, save_interval=200, save_file_name="your_model_name.model")
To train:
python train.py
To test:
python utils.py
You will need python version 3.6 to run this, since we are using tensorflow 1. All the requirements are there in requirements.txt
Just do the following to install them:
pip install -r requirements.txt
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
- Please make sure you check your spelling and grammar.
- Create individual PR for each suggestion.
- Please also read through the Code Of Conduct before posting your first idea as well.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- Warun Panpaliya - VNIT Computer Science 2022 - Warun Panpaliya
- Samruddhi Pande - VNIT Computer Science 2022 - Samruddhi Pande
- Dhruv Sharma - VNIT Computer Science 2022
- Revin Gohil - VNIT Computer Science 2022