Open Mandroide opened 3 years ago
@Mandroide can i have the anomaly detection repositories source code you mentioned above? Best regards,
@Mandroide can i have the anomaly detection repositories source code you mentioned above? Best regards,
2020
2019
2018
I have tested several anomaly detection repositories source code, and most of them didn't work. I have some advice for the upcoming code
Essential
[ ] Test it on a single purpose container like Docker (or you can just use Google Colab if you want). A base image like Ubuntu 18 is a good start to track if there are dependencies that must be specified in a requirements.txt file.
[ ] Prefer to use pathlib over os module or raw string for paths.
[ ] Use absolute paths over relative paths to allow the scripts to run wherever the user is executing them.
[ ] Use argparse to input paths (e.g. paths of directory). The following is a good example
for i in range(1, 101)
to iterate video files. If a video doesn't have a name like 1.mp4, this won't work. Iterate them like pathlib objects and convert it to str when using OpenCV.The reason of encapsulating the running code within the main function, you can find it in main — Top-level code environment
Optional