JimLee1996 / AVSS2019

Efficient Violence Detection Using 3D Convolutional Neural Networks
MIT License
15 stars 10 forks source link

I would like to thank you for your interesting work. How to identify the causes of violence? Thanks again for your interesting work. #7

Open lawoyiba opened 3 years ago

JimLee1996 commented 3 years ago

please see https://github.com/JimLee1996/AVSS2019/tree/master/src/Demo

lawoyiba commented 3 years ago

Is it through this line of code? def predict(self, x): x = x.to(self.device)

need N x C x T x H x W

    if len(x.shape) < 5:
        x = x.unsqueeze(0)
    y = self.net(x)

    _, results = y.topk(1, 1, True)

    labels = ['normal' if x else 'violent' for x in results]

    return labels
JimLee1996 commented 3 years ago

Yep

lawoyiba commented 3 years ago

Thank you for your reply. I read your paper. What are the methods used to distinguish violent behavior from normal behavior? Thank you again for your work

JimLee1996 commented 3 years ago

We use deep learning methods to do this job. 3DCNNs are proved to be effective on learning spatio-temporal features. Here we introduce DenseNet architecture to better learn the motion pattern of violent behavior. The outputs of model are logits of classes (in this task, violence and non-violence)

lawoyiba commented 3 years ago

Thank you for your reply, After the video passes the DenseNet model, it will identify whether there is violence in the video.

JimLee1996 commented 3 years ago

Use softmax. Please refer to https://github.com/JimLee1996/AVSS2019/issues/2.

lawoyiba commented 3 years ago

Thank you for your reply