C3D
C3D copied to clipboard
question about compute volume mean
when I run the create_volume_mean.sh ,the following question is:
I0217 20:11:32.672004 19663 compute_volume_mean_from_list.cpp:53] using dropping rate 10 I0217 20:11:32.695142 19663 compute_volume_mean_from_list.cpp:80] Starting Iteration F0217 20:11:33.270965 19663 compute_volume_mean_from_list.cpp:92] Check failed: size_in_datum == data_size (0 vs. 1050624) Incorrect data field size 0 *** Check failure stack trace: *** @ 0x7fa4164c7dbd google::LogMessage::Fail() @ 0x7fa4164c9c5d google::LogMessage::SendToLog() @ 0x7fa4164c79ac google::LogMessage::Flush() @ 0x7fa4164ca57e google::LogMessageFatal::~LogMessageFatal() @ 0x408d10 main @ 0x7fa4144e8f45 (unknown) @ 0x408ecd (unknown) Aborted (core dumped)
Tried many ways, but still no solution.I would appreciated for some advice,very thanks!
make sure all* paths to videos/fames are correct in C3D/examples/c3d_finetuning/train_01.lst.
Your opencv3** should be compiled with ffmpeg.
Thank you for your reply! Do you have the tutorial of the "compiled opencv3** with ffmpeg".
well if you are on windows or on mac then I am sure how you can re-install the opencv compiled with ffmpeg. on ubuntu system either you can follow the instruction provided in below link. http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/
or follow these instructions. sudo apt-get install build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
install ffmpeg using instructions mentioned in below link http://stackoverflow.com/questions/29125229/how-to-reinstall-ffmpeg-clean-on-ubuntu-14-04
then somewhere in your system (~/) do:
git clone https://github.com/Itseez/opencv.git
cd opencv
mkdir build
cd build
ccmake .. (this command will open cmake page where your to say 'with ffmpeg' yes, if you don't see the option press t)
after that press c, if it gives some error like lib missing then mention the correct path.
then press g
after pressing g you will come out of ccmake .. command then execute
make
make install
now opencv with ffmpeg must have been installed.
For more details checkout below link
http://docs.opencv.org/3.0-beta/doc/tutorials/introduction/linux_install/linux_install.html
I would suggest first check are you able to open video files in opencv. If you are able to do so it means your opencv is ok.
run
import numpy as np import cv2
cap = cv2.VideoCapture('path to some video')
while(True): # Capture frame-by-frame ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release() cv2.destroyAllWindows()
source: http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html
thank you !,I have check my opencv is ok.
@deepaksharma36 sorry to be a bothered. I meet another question: the version of opencv is must 3**? the install link of ffmpeg doesn't work,could I install any version of ffmpeg?
@deepaksharma36 whether the *jpg of the ucf101 dataset should be resized as 171x128?
no, I didn't resize the frames. I just created frames using: ffmpeg -i "/path/to/video" "/path/to/frm/dir/%06d.jpg" then I mentioned the paths of these frames in below file. C3D/examples/c3d_finetuning/train_01.lst.
Thank you for your answer.
@deepaksharma36 thanks for helping. @sophiazy have you solved your issue? you don't need to scale your image in advanced, the data layer can do that for you (with a little extra cost).
@deepaksharma36 because of I run the code in the server ,administrator has install the opencv and ffmpeg,but I am not sure he compiles opencv with ffmpeg.How I test it?
@dutran sorry to be bothered .I haven't create volume mean for ucf101, I am confused .could you send the .binaryproto file to me by the email?
we can try few things, since you have mentioned that your opencv is able to run video. Though I am not 100% sure but I think your opencv must have been installed with ffmpeg because else you would have not able to run video.
Have you tried to run testcases of c3d using below cmd make runtest? In case you tried, please tell me about the output you observed
You should also try to run(finetuning, training, feature extraction) c3d on video mode.
you can do by mentioning the avi file paths in below file C3D/examples/c3d_finetuning/train_01.lst Ex ~/UCF101/category/video_name.avi starting_fram(put 0) label(numaric value) ~/UCF101/category/video_name.avi starting_fram(put 0) label(numaric value) (for the time being just create this file maually with few entires(2 to 5) as we are testing things)
then run the create_volume_mean.sh
if this time it works then
go to respective(train,feature extraction,finetune) prototxt file
example:
https://github.com/facebook/C3D/blob/master/C3Dv1.1/examples/c3d_ucf101_training/train_simple.prototxt
change line number 23
from
use_image: true
to
use_image: false
And run the script
.......................................................................................................................................... . . . . [ OK ] ConvolutionLayerTest/1.TestGPUGradientGroup (2987 ms) [ RUN ] ConvolutionLayerTest/1.TestGPUGradient [ OK ] ConvolutionLayerTest/1.TestGPUGradient (2191 ms) [ RUN ] ConvolutionLayerTest/1.TestGPUSimpleConvolution [ OK ] ConvolutionLayerTest/1.TestGPUSimpleConvolution (1 ms) [ RUN ] ConvolutionLayerTest/1.TestCPUGradientGroup [ OK ] ConvolutionLayerTest/1.TestCPUGradientGroup (2297 ms) [ RUN ] ConvolutionLayerTest/1.TestGPUSimpleConvolutionGroup [ OK ] ConvolutionLayerTest/1.TestGPUSimpleConvolutionGroup (1 ms) [ RUN ] ConvolutionLayerTest/1.TestSetup [ OK ] ConvolutionLayerTest/1.TestSetup (0 ms) [----------] 9 tests from ConvolutionLayerTest/1 (9247 ms total)
[----------] 10 tests from LRNLayerTest/0, where TypeParam = float [ RUN ] LRNLayerTest/0.TestGPUGradientAcrossChannels [ OK ] LRNLayerTest/0.TestGPUGradientAcrossChannels (21833 ms) [ RUN ] LRNLayerTest/0.TestCPUGradientAcrossChannels [ OK ] LRNLayerTest/0.TestCPUGradientAcrossChannels (17972 ms) [ RUN ] LRNLayerTest/0.TestGPUForwardAcrossChannels [ OK ] LRNLayerTest/0.TestGPUForwardAcrossChannels (1 ms) [ RUN ] LRNLayerTest/0.TestCPUForwardAcrossChannels [ OK ] LRNLayerTest/0.TestCPUForwardAcrossChannels (1 ms) [ RUN ] LRNLayerTest/0.TestSetupAcrossChannels [ OK ] LRNLayerTest/0.TestSetupAcrossChannels (1 ms) [ RUN ] LRNLayerTest/0.TestCPUGradientWithinChannel [ OK ] LRNLayerTest/0.TestCPUGradientWithinChannel (17990 ms) [ RUN ] LRNLayerTest/0.TestCPUForwardWithinChannel [ OK ] LRNLayerTest/0.TestCPUForwardWithinChannel (1 ms) [ RUN ] LRNLayerTest/0.TestGPUGradientWithinChannel [ OK ] LRNLayerTest/0.TestGPUGradientWithinChannel (43129 ms) [ RUN ] LRNLayerTest/0.TestGPUForwardWithinChannel [ OK ] LRNLayerTest/0.TestGPUForwardWithinChannel (2 ms) [ RUN ] LRNLayerTest/0.TestSetupWithinChannel [ OK ] LRNLayerTest/0.TestSetupWithinChannel (1 ms) [----------] 10 tests from LRNLayerTest/0 (100931 ms total)
[----------] 4 tests from SyncedMemoryTest [ RUN ] SyncedMemoryTest.TestInitialization [ OK ] SyncedMemoryTest.TestInitialization (0 ms) [ RUN ] SyncedMemoryTest.TestCPUWrite [ OK ] SyncedMemoryTest.TestCPUWrite (2 ms) [ RUN ] SyncedMemoryTest.TestAllocation [ OK ] SyncedMemoryTest.TestAllocation (2 ms) [ RUN ] SyncedMemoryTest.TestGPUWrite [ OK ] SyncedMemoryTest.TestGPUWrite (22 ms) [----------] 4 tests from SyncedMemoryTest (26 ms total)
[----------] Global test environment tear-down [==========] 417 tests from 74 test cases ran. (29822755 ms total) [ PASSED ] 417 tests.
YOU HAVE 2 DISABLED TESTS ...................................................................................................................................... @deepaksharma36 The above is the part result when I run make runtest. Is there any problem? I use the frame file ,not the video file,The frame names are formatted as “ video_folder/%06d.jpg ”.I can't compute volume mean,but I think my configure about train_01.lst and opencv is Ok,so I an confused.When I run the shell ,the problem is below: ................................................................................................................................................................................................... I0306 14:37:35.782259 5432 compute_volume_mean_from_list.cpp:53] using dropping rate 10 I0306 14:37:35.897634 5432 compute_volume_mean_from_list.cpp:80] Starting Iteration F0306 14:37:36.801951 5432 compute_volume_mean_from_list.cpp:92] Check failed: size_in_datum == data_size (0 vs. 1050624) Incorrect data field size 0 *** Check failure stack trace: *** @ 0x7fcbdbf0cdaa (unknown) @ 0x7fcbdbf0cce4 (unknown) @ 0x7fcbdbf0c6e6 (unknown) @ 0x7fcbdbf0f687 (unknown) @ 0x408ab2 main @ 0x7fcbd9ec7ec5 (unknown) @ 0x408cc2 (unknown) @ (nil) (unknown) Aborted (core dumped) ..................................................................................................................................................................................................
It looks like you cannot read video from your list. It failed here (https://github.com/facebook/C3D/blob/master/C3D-v1.0/tools/compute_volume_mean_from_list.cpp#L92). Which mean size_in_datum = 0. Can you share your list file?
Hello Du,
I also face the similar problem. While running compute_volume_mean.sh, the following error comes.
compute_volume_mean_from_list.cpp:92] Check failed: size_in_datum == data_size (6000 vs. 0) Incorrect data field size 6000
Kindly suggest.