Coder Social home page Coder Social logo

Comments (9)

WaqasSultani avatar WaqasSultani commented on July 23, 2024

Hi,
I am not sure about the different feature vectors. Actually, I have downloaded C3D around 2 years ago. They might have changed something after that---not sure though. If that is the case, you might need to retrain the model.

from anomalydetectioncvpr2018.

lrd8715923 avatar lrd8715923 commented on July 23, 2024

Dear sir,
@WaqasSultani,Thank you for your great work, it is really nice.I have been able to extract features using c3d (caffe2) and test results by use FC's model from you provide,i comparison the results of our results with SampleVideos from you provide.I find it is a little different.(For each images,the first results is SampleVideos from you provide,the sencond results is our)I was so confused,i use same FC model,so i guess is C3D'model made this difference.I want to get same results as SampleVideos from you provide. Could you please provide your C3D'model,please provide a download link or send to my email:[email protected]. Thank you very much.
And i have a question,i feel the 3D convolution's method of your paper is a little old.I want to replace C3D with newest method(such as R(2+1)D or Multi-Fiber Net) and retrain FC'layer to Improving AUC .What do you think of that?Could you give me some instructions.
Best greetings from Liruodao.
e8
e8a
e25
e25a
r2
r2a
r22
r22a
r123
r123a
s8
s8a
s28
s28a
s33
s33a

from anomalydetectioncvpr2018.

Afladimir1 avatar Afladimir1 commented on July 23, 2024

Hi,
I am not sure about the different feature vectors. Actually, I have downloaded C3D around 2 years ago. They might have changed something after that---not sure though. If that is the case, you might need to retrain the model.

You are probably right, I'm also getting very different results. Can you provide us your version of C3D? Thanks in advance.

from anomalydetectioncvpr2018.

junaidwahid avatar junaidwahid commented on July 23, 2024

@Afladimir1 same here, @WaqasSultani can you provide your C3D version?

from anomalydetectioncvpr2018.

nerdykamil avatar nerdykamil commented on July 23, 2024

Thank you for the suggestion @WaqasSultani. When I try to retrain the model using the command python TrainingAnomalyDetector_public.py. It throws error on line: model.train_on_batch(inputs, targets). I searched the error but couldn't find anything helpful.

My Feature matrix has shape (256,4096)
The shape of target vector is (256,) - tried reshaping to (256,1), didn't help

The output of the train command is:

**Using Theano backend.
/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/pywt/init.py:16: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._extensions._pywt import *
/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/pywt/_swt.py:8: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._extensions._swt import swt_max_level, swt as _swt, swt_axis as _swt_axis
Create Model
Starting training...
number and name of folders
2
['Abnormal', 'Normal']
Loading Abnormal videos Features...
Abnormal Features loaded
Abnormal Features loaded
Abnormal Features loaded
Abnormal Features loaded
Loading Normal videos...
Features loaded
Traceback (most recent call last):
File "TrainingAnomalyDetector_public.py", line 309, in
batch_loss =model.train_on_batch(inputs, targets)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/keras/models.py", line 719, in train_on_batch
class_weight=class_weight)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/keras/engine/training.py", line 1239, in train_on_batch
outputs = self.train_function(ins)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 792, in call
return self.function(*inputs)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/theano/compile/function_module.py", line 917, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else
ValueError: Input of CAReduce{maximum} has zero-size on axis 0
Apply node that caused the error: Reduce{maximum}{0}(Subtensor{int64:int64:}.0)
Toposort index: 1218
Inputs types: [TensorType(float32, vector)]
Inputs shapes: [(0,)]
Inputs strides: [(4,)]
Inputs values: [array([], dtype=float32)]
Outputs clients: [[MakeVector{dtype='float32'}(max), InplaceDimShuffle{x}(max)]]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
File "TrainingAnomalyDetector_public.py", line 278, in
model.compile(loss=custom_objective, optimizer=adagrad)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/keras/models.py", line 553, in compile
**kwargs)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/keras/engine/training.py", line 630, in compile
sample_weight, mask)
File "/home/lfd/anaconda3/envs/c3d_caffe2_try3/lib/python2.7/site-packages/keras/engine/training.py", line 332, in weighted
score_array = fn(y_true, y_pred)
File "TrainingAnomalyDetector_public.py", line 222, in custom_objective
sub_max = T.concatenate([sub_max, T.stack(T.max(Feat_Score))]) # Keep the maximum score of scores of all instances in a Bag (video)

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.**

from anomalydetectioncvpr2018.

nerdykamil avatar nerdykamil commented on July 23, 2024

Keeping the batch_size 60 I was able to train the model and get the results. Thank you 👍

from anomalydetectioncvpr2018.

DenisN03 avatar DenisN03 commented on July 23, 2024

@nerdykamil, @lrd8715923. can you tell me how you prepared the features? What should the folder structure be for training?

from anomalydetectioncvpr2018.

mrkstt avatar mrkstt commented on July 23, 2024

Hi @nerdykamil , on your side how long the training process has done?. I'm using GTX 1050 Ti, and it's already two days, and the training is still ongoing.

from anomalydetectioncvpr2018.

hali6779 avatar hali6779 commented on July 23, 2024

Hi @lrd8715923, may I have some guidance on how to replace C3D with other methods or do you have any sample code for that? Thanks in advance.

from anomalydetectioncvpr2018.

Related Issues (20)

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.