kevaldoshi17 / Prediction-based-Video-Anomaly-Detection-

MIT License
17 stars 10 forks source link

Real-Time usage #3

Closed vishalned closed 3 years ago

vishalned commented 3 years ago

Hey I'm sorry but I am a bit confused, by online do you mean real-time? Because for a real-time use case we cannot store the psnr results before hand, and I am currently trying the code on a tesla p100, and the psnr results itself take time to generate (about 3 fps)

kevaldoshi17 commented 3 years ago

Hello, yes by online we mean real-time. I am not sure why it is taking so long for the psnr results to generate, could you maybe check if it is using the GPU? For reference, it took me a couple of minutes for the entire dataset using a RTX 2070.

vishalned commented 3 years ago

Oh okay, thanks for your reply, not sure why its so slow then. Yeah I just checked, I am using a GPU. I was running it on colab.

mausLe commented 3 years ago

@vishalned Hi Vishal, would you mind sharing with me your Colab Notebook link? I'm struggling to run it online. Here is my email: hidden Thank you so much.

Zain-Gill123 commented 3 years ago

Hello Vishal (@vishalned ), could you please share the Colab Link with me? I'm having issues running it. My Email: zainmobile0123@gmail.com Much appreciated!

mausLe commented 3 years ago

@Zain-Gill123 Check out my repo: https://colab.research.google.com/drive/1Z3pJx0WptM7Lzu4tQgMx7O40iHLCHd1k?usp=sharing (Forgive me if you find the source codes messy)

Zain-Gill123 commented 3 years ago

@mausLe Thank you so much! And no worries about the messy code! Lol. Cheers!

Zain-Gill123 commented 2 years ago

@mausLe Hey! Hope you're doing well. I was going through your code and have found myself stuck on the following line of code and I am unable to locate/trace the file myTrainingResult.json. I have searched for the file as well, but I could not find it.

Snippet of the Code:

!./darknet detector test cfg/coco.data cfg/yolov4.cfg /content/darknet/cfg/yolov4.weights -ext_output -dont_show -out /content/Data/Codes/myTrainingResult.json < /content/Data/trainImagePath.txt

Any type of help would be highly appreciated! Cheers!

mausLe commented 2 years ago

Hi @Zain-Gill123 The purpose of the above snippet of code is to export the YOLO detection result of every input image in trainImagePath.txt into the myTrainingResult.json

Check out this link: https://stackoverflow.com/a/63171911

The reason I created the myTrainingResult.json was similar to myTrainingResult.json https://github.com/kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/blob/main/result_train_ucsd.json when he used the detected details to run the prediction directly without calling the YOLO model.

See the 2nd section where KevalDoshi loaded the predicted object details result_train_ucsd.json https://github.com/kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/blob/main/MONAD.ipynb

mausLe commented 2 years ago

Though I assume that I remove this file later I found it pretty useful if you need to save time to process the training object.

Try to review KevalDoshi's Notebook carefully, I suppose that my work is derived from his

Zain-Gill123 commented 2 years ago

@mausLe Thank You so much for the quick and informative response! Solved the problem. Much appreciated! Cheers!