anomalib icon indicating copy to clipboard operation
anomalib copied to clipboard

Custom video data support

Open samet-akcay opened this issue 1 year ago • 7 comments

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.

samet-akcay avatar Feb 09 '24 09:02 samet-akcay

Hello, @samet-akcay I wish to take this.

Bepitic avatar Mar 18 '24 15:03 Bepitic

Sure, all yours

samet-akcay avatar Mar 18 '24 15:03 samet-akcay

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.

Bepitic avatar Mar 22 '24 11:03 Bepitic

I think it would be good to get @djdameln's opinion here as well..

samet-akcay avatar Mar 22 '24 15:03 samet-akcay

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.

djdameln avatar Mar 26 '24 12:03 djdameln

Thanks @djdameln

samet-akcay avatar Mar 26 '24 12:03 samet-akcay

@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!

RitikaxShakya avatar Mar 28 '24 12:03 RitikaxShakya