AnomalyDetectionCVPR2018-Pytorch
AnomalyDetectionCVPR2018-Pytorch copied to clipboard
[QUESTION] feature extraction performance
I would like to increase the performance of the feature extraction procedure. Currently, I'm generating clips from several streams and using the video_loader.py implementation (without the GUI) to perform inference with the C3D trained feature extractor + model. The problem is that for a 2 min clip, in my RTX 2060, it's taking around 55 seconds to complete the entire process (feature extraction + anomaly detection) with the num_worker parameter set to 8.
Is there an alternative? Maybe using torch serve? I would like to perform this process as fast as possible since I will use a pool of machines with GPUs to infer the videos generated by several hundred cameras in near-real time.
Thanks
I would suggest trying torch's DataParallel or DistributedDataParallel. However, I'm a bit out of context of the purpose. Are you just trying to extract features, without making predictions?
Oh, that's great! Thank you, I will give it a shot. I'm extracting the features and making predictions for each clip. To do a prediction for a clip takes about 0.005s, so that's why my concern is the feature extraction process.