The anomoly detector at https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/tree/master/anomaly seems to do optical flow? How is it an anomaly detector?
In this example we use optical flow to find the vehicle movement direction. This direction data can be used for anomaly detection say vehicle moving in reverse direction. It depends on use case.