Giter Site home page Giter Site logo

dolongbien / humanbehaviorbku Goto Github PK

View Code? Open in Web Editor NEW
156.0 9.0 57.0 660.27 MB

Abnormal Human Behaviors Detection/ Road Accident Detection From Surveillance Videos/ Real-World Anomaly Detection in Surveillance Videos/ C3D Feature Extraction

Python 24.73% Shell 1.27% Jupyter Notebook 45.81% MATLAB 5.96% CSS 3.92% JavaScript 6.41% HTML 11.91%
deep-learning abnormal-behavior-detection road-accident-detection 3d-convolutional-network multiple-instance-learning theano keras caffe road-accident-dataset django-application

humanbehaviorbku's Introduction

dolongbien

Parallel Computing 2018 (Lab)

humanbehaviorbku's People

Contributors

dependabot[bot] avatar doduchoai avatar dolongbien avatar ntdat017 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

humanbehaviorbku's Issues

how to generate TXT files

Hello,

when I upload a video into the project through GUI...
celery is running and producing .npy files in media/features/ folder.

But I need .TXT file for an uploaded video in media/features/ in order to run 'video/str:video_type/str:video_title' (from url for VideoDetailView)

  1. How to generate .txt file for a particular video(which function is taking care of producing .txt file in the code)?
  2. How to generate .mat file for a particular video(which function is taking care of producing .mat file in the code)?

Thanks in advance

Dataset

Can you please share the dataset.

Running on colab ..Unable to extract feature using c3d

extract feature

%cd /content/C3D/C3D-v1.0/examples/c3d_feature_extraction
!sudo bash c3d_sport1m_feature_extraction_video.sh

This is the error I am getting while executing the above code.
I0117 06:43:11.085855 4186 net.cpp:183] Collecting Learning Rate and Weight Decay.
I0117 06:43:11.085873 4186 net.cpp:176] Network initialization done.
I0117 06:43:11.085881 4186 net.cpp:177] Memory required for Data 5653289408
E0117 06:43:11.816212 4186 extract_image_features.cpp:81] Extracting features for 1 batches
F0117 06:43:13.534600 4186 vol2col.cu:75] Check failed: error == cudaSuccess (48 vs. 0) no kernel image is available for execution on the device
*** Check failure stack trace: ***
c3d_sport1m_feature_extraction_video.sh: line 3: 4186 Aborted (core dumped) GLOG_logtosterr=1 ../../build/tools/extract_image_features.bin prototxt/c3d_sport1m_feature_extractor_video.prototxt conv3d_deepnetA_sport1m_iter_1900000 0 50 1 prototxt/output_list_video_prefix.txt fc7-1 fc6-1 prob

Failed when upload new video

Hi @dolongbien, I have ran your project and it worked great. But when I add a new video, the webpage of that task is cracked while the other task still working well. The error is:
NoReverseMatch at /catalog/video-upload
Reverse for 'task_status' with arguments '('',)' not found. 1 pattern(s) tried: ['celery\-progress\/(?P<task_id>[\w-]+)/$']
Could you help me solved this. Thank you.

[web app] can't view any of the videos

The integration went mostly successful and after a few hours of debugging, I was successfully deployed the web app at localhost http://127.0.0.1:8000.

But when I click the "video demo" tab and click one of the videos,
I get the following error

issue

any ideas on how to fix this?

thanks

edit:
here's the server-side error

Internal Server Error: /catalog/video/abnormal/RoadAccidents343_x264
Traceback (most recent call last):
  File "C:\Users\Anaconda3\envs\[]\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\Users\c\Anaconda3\envs\trillion_question_mark\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\p\Anaconda3\envs\trillion_question_mark\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\c\Anaconda3\envs\trillion_question_mark\lib\site-packages\django\views\generic\base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "C:\Users\c\Anaconda3\envs\trillion_question_mark\lib\site-packages\django\views\generic\base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "C:\Users\c\Anaconda3\envs\trillion_question_mark\lib\site-packages\django\views\generic\base.py", line 158, in get
    context = self.get_context_data(**kwargs)
  File "C:\\[]\HumanBehaviorBKU\WebApp\catalog\views.py", line 84, in get_context_data
    x, scores = get_score(video_path)
  File "C:\[]\HumanBehaviorBKU\WebApp\c3d\plot_controller.py", line 73, in get_score
    F_Score = np.matlib.repmat(predictions[iv],1,(int(total_segments[iv+1])-int(total_segments[iv])))
  File "C:\Users\[]\Anaconda3\envs\trillion_question_mark\lib\site-packages\numpy\matlib.py", line 362, in repmat
    c = a.reshape(1, a.size).repeat(m, 0).reshape(rows, origcols).repeat(n, 0)
ValueError: negative dimensions are not allowed
[17/Jul/2019 21:47:45] "GET /catalog/video/abnormal/RoadAccidents343_x264 HTTP/1.1" 500 115664

It failed to make build folder which helps in feature extractions

!make test

/usr/local/cuda/bin/nvcc -ccbin=/usr/bin/g++ -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/local/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/include/hdf5/serial/ -Ibuild/src -I./src -I./include -I/usr/local/cuda/include -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -c src/caffe/util/im2col.cu -o build/src/caffe/util/im2col.cuo nvcc fatal : Unsupported gpu architecture 'compute_30' Makefile:347: recipe for target 'build/src/caffe/util/im2col.cuo' failed make: *** [build/src/caffe/util/im2col.cuo] Error 1

While running this file it failed to build. Is there any particular reason or configuration is match

AttributeError: 'int' object has no attribute 'set_progress'

Function -
def extract_feature_video(video_path, progress_recorder, features_per_bag = params.features_per_bag):
........
........
........

running this gives error:-

Models initialized
Traceback (most recent call last):
File "extract_feature.py", line 67, in
extract_feature_video('media/videos/anormaly/Shoplifting028_x264.mp4', 32)
File "extract_feature.py", line 30, in extract_feature_video
progress_recorder.set_progress(i, len(video_clips))

Has anyone got this error ?

Problems in protoc version

I would like to know which version of protoc is used, as I am encountering the following problem while compiling C3D:

In file included from build/src/caffe/proto/caffe_pretty_print.pb.cc:4:0:
build/src/caffe/proto/caffe_pretty_print.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
build/src/caffe/proto/caffe_pretty_print.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
build/src/caffe/proto/caffe_pretty_print.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from build/src/caffe/proto/caffe.pb.cc:4:0:
build/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
build/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers.

The output score is all 0.The OneDrive link you put is invalid

Hello, I am running your HumanBehaviorBKU on GitHub. I converted fc-6 into TXT form and put it into the program. The output score is all 0.The OneDrive link you put is invalid, so could you please send me some testing videos (mp4 and fc-6) that you used in the experiment,Or repost a link on GitHub.so that I can check what's wrong with myself.Thank you very much!

AttributeError: module 'theano' has no attribute 'tests'

already tried after install "pip install nose". but can't solve this.

`Using Theano backend.


AttributeError Traceback (most recent call last)

in ()
----> 1 from keras.models import Sequential
2 from keras.layers import Dense, Dropout, Activation, TimeDistributedDense ,LSTM,Reshape
3 from keras.regularizers import l2
4 from keras.optimizers import SGD,adam, Adagrad
5 from scipy.io import loadmat, savemat

3 frames

/usr/local/lib/python3.6/dist-packages/theano/init.py in ()
98 # needed during that phase.
99 import theano.tests
--> 100 if hasattr(theano.tests, "TheanoNoseTester"):
101 test = theano.tests.TheanoNoseTester().test
102 else:

AttributeError: module 'theano' has no attribute 'tests'`

https://drive.google.com/open?id=1a2JBxpTjYd_K7UhJXkQCYfJfso2jYHiM

Dataset

Thank you for your amazing work.
I wonder that which dataset you are using. Did you extract from UCF crime dataset?

Evaluate_anomaly_detector.m- C3D features for videos (.fc file) what's this .fc files

i was trying to run your Evaluate_anomaly_detector.m file but you mentioned there that for C3D_CNN_Path case needed to put .fc files there but how to get that .fc files

and got error like this

ivideo =

 1

Undefined variable "Annotation_file" or class "Annotation_file.VideoName".

Error in Evaluate_Anomaly_Detector_RoadAccident (line 33)
check=strmatch(All_Videos_scores(ivideo).name(1:end-6),Annotation_file.VideoName(1:end-3));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.