anomalib
anomalib copied to clipboard
Custom video data support
Discussed in https://github.com/openvinotoolkit/anomalib/discussions/1721
Originally posted by samet-akcay February 9, 2024 Anomalib currently supports a number of video anomaly detection datasets. Similar to image folder data support, it would be great to support a custom datamodule for video datasets.
Hello, @samet-akcay I wish to take this.
Sure, all yours
Hello @samet-akcay, I am finishing the code, in: bepitic-anomalib-custom-videoFolder I have a couple of minor doubts: The first one is the format that we can admit ( atm I'm accepting only '.AVI' as the data and '.npy' as the mask), I have also a utility function taken from ShanghaiTech DatasetModule ( _convert_training_videos ), that converts all the videos in a folder to solve some incompatibility issues, We could use this to solve some incompatibilities.
Secondly, should I create a Notebook to explain the functionality of this piece of code and the anomalib functionality with video? Thank you for the work.
I think it would be good to get @djdameln's opinion here as well..
Ideally I think we should support various video formats, including .avi
, .mp4
and folder of image frames at the minimum. Same for the ground truth, I think it would be best to allow multiple formats for maximum flexibility. At the minimum, I feel we should support folder of ground truth image masks (like UCSDped) and .npy
and .pt
for numpy arrays and pytorch tensors respectively.
A notebook to showcase the functionality would be great!
Final piece of advice would be to have a close look at the Folder
dataset and try to match the API of that class as closely as possible in your video folder dataset, which would be good for consistency and usability.
Thanks @djdameln
@samet-akcay Hello! I would like to contribute on this Issue, but i think @Bepitic is already working on this. Can you maybe recommend me another gfi in this repo? Thank You!