imatge-upc / activitynet-2016-cvprw

Tools to participate in the ActivityNet Challenge 2016 (NIPSW 2016)
https://imatge-upc.github.io/activitynet-2016-cvprw/
MIT License
195 stars 85 forks source link

can not run it! #22

Closed qiangzhang007 closed 6 years ago

qiangzhang007 commented 6 years ago

Recently,I want to study the project of activitynet-2016-cvprw,but i meet some problem!

As https://github.com/imatge-upc/activitynet-2016-cvprw/issues/18 deccribing, I change the code

def run_all_pipeline(input_video, smoothing_k, activity_threshold): input_size = (112, 112)

to

def run_all_pipeline(input_video, smoothing_k, activity_threshold): input_size = ((16, 112, 112, 3)

, then,i run command "python scripts/run_all_pipeline.py -i changge.mp4",but another probelm appear. as u see blow:

Using TensorFlow backend. Reading Video... Duration: 30.7s FPS: 24.9 Number of frames: 765 Traceback (most recent call last): File "scripts/run_all_pipeline.py", line 284, in args.activity_threshold) File "scripts/run_all_pipeline.py", line 35, in run_all_pipeline video_array = video_array.reshape((nb_clips, length, 3, 112, 112)) ValueError: cannot reshape array of size 4042752 into shape (47,16,3,112,112)

how i can run this demo smoothly? hope for you answer.

samouha commented 6 years ago

Probably, this error is caused by the backend used, it is 'Theano' and not TensorFlow ! change it in the file json.keras: (Keras with Theano backend) $ sudo gedit $HOME/.keras/keras.json