Code Monkey home page Code Monkey logo

Comments (13)

dutran avatar dutran commented on July 22, 2024 4

Oops, just check and realize the tool only takes images.
https://github.com/facebook/C3D/blob/master/tools/compute_volume_mean_from_list.cpp#L65
You either:

  1. extract you movies into frames
  2. modify https://github.com/facebook/C3D/blob/master/tools/compute_volume_mean_from_list.cpp#L65 and https://github.com/facebook/C3D/blob/master/tools/compute_volume_mean_from_list.cpp#L88
    to use ReadVideoToVolumeDatum (https://github.com/facebook/C3D/blob/master/src/caffe/util/image_io.cpp#L101) instead of ReadImageSequenceToVolumeDatum

from c3d.

dutran avatar dutran commented on July 22, 2024

Yes, your mean file is empty because of IO error.

  1. You may want to check you relative location (path to files), if the files are existed. If possible convert them to absolutely paths to make less confused.
  2. If 1 is correct, then it may be the case your OpenCV is not compiled with ffmpeg thus It does not have appropriate codec to read your video files. In that case, you can re-compile ffmpeg, then opencv with --enable-shared flag is ON

from c3d.

VigneshSrinivasan10 avatar VigneshSrinivasan10 commented on July 22, 2024

I have tried both the solutions!
I dont seem to find where the error could be.

from c3d.

VigneshSrinivasan10 avatar VigneshSrinivasan10 commented on July 22, 2024

Great :) Thanks for the clarification.
I will try it out and let u know.

from c3d.

VigneshSrinivasan10 avatar VigneshSrinivasan10 commented on July 22, 2024

Dear Tran,

I have written down the frames from the videos with each folder being named after the video, and every frame named after the frame numbers. eg: 1.jpg, 2.jpg,...

and my train.lst looks like this now:

c3d_finetuning_HMDB51/dataFrames1/April_09_brush_hair_u_nm_np1_ba_goo_0/ 1 0
c3d_finetuning_HMDB51/dataFrames1/April_09_brush_hair_u_nm_np1_ba_goo_0/ 17 0
c3d_finetuning_HMDB51/dataFrames1/April_09_brush_hair_u_nm_np1_ba_goo_0/ 33 0
c3d_finetuning_HMDB51/dataFrames1/April_09_brush_hair_u_nm_np1_ba_goo_0/ 49 0

And I still get a mean file of 10Bytes. Am I passing the correct values ?

from c3d.

dutran avatar dutran commented on July 22, 2024

you should make your file names as %06d.jpg
Sorry, I did a lazy job. If I have time, will spend on this to make IO function nicer :)

from c3d.

VigneshSrinivasan10 avatar VigneshSrinivasan10 commented on July 22, 2024

Thank you. I have got the mean file now.

from c3d.

dutran avatar dutran commented on July 22, 2024

Glad to hear, good luck with your experiments!

from c3d.

TinkerBell123 avatar TinkerBell123 commented on July 22, 2024

hi du,i use ffmpeg to extract frames from videos,here is an example of my frames:
master/data/users/trandu/datasets/ucf101/frm/ApplyEyeMakeup/v_ApplyEyeMakeup_g09_c04]# ls
000001.jpg 000021.jpg 000041.jpg 000061.jpg 000081.jpg 000101.jpg 000121.jpg 000141.jpg 000161.jpg 000181.jpg

and,when i run the create_volume_mean file,there some error:

sh create_volume_mean.sh

I1202 14:35:56.476048 31451 compute_volume_mean_from_list.cpp:53] using dropping rate 10
I1202 14:35:56.476285 31451 compute_volume_mean_from_list.cpp:81] Starting Iteration
E1202 14:35:56.595129 31451 compute_volume_mean_from_list.cpp:107] Processed 10000 files.
E1202 14:35:56.599031 31451 compute_volume_mean_from_list.cpp:113] Processed 10725 files.
I1202 14:35:56.599041 31451 compute_volume_mean_from_list.cpp:120] Write to ucf101_train_mean.binaryproto
I1202 14:35:56.599046 31451 compute_volume_mean_from_list.cpp:121] sum blob num: 1
I1202 14:35:56.599051 31451 compute_volume_mean_from_list.cpp:122] sum blob channels: 3
I1202 14:35:56.599056 31451 compute_volume_mean_from_list.cpp:123] sum blob length: 16
I1202 14:35:56.599061 31451 compute_volume_mean_from_list.cpp:124] sum blob height: 0
I1202 14:35:56.599064 31451 compute_volume_mean_from_list.cpp:125] sum blob width: 0

I check the compute_volum_mean_from_list.cpp:

ReadImageSequenceToVolumeDatum(frm_dir.c_str(), start_frm, label, length, height, width, sampling_rate, &datum);
69 sum_blob.set_num(1);
70 sum_blob.set_channels(datum.channels());
71 sum_blob.set_length(datum.length());
72 sum_blob.set_height(datum.height());
73 sum_blob.set_width(datum.width());

i think the erro happen in the function ReadImageSequenceToVolumeDatum,the height=128,width=171,and datum.height()=0,datum.width()=0.

so ,what do you think the error is ,thank you !

from c3d.

Michael-Guo avatar Michael-Guo commented on July 22, 2024

@vignesh10 Hello, I want to finetune the C3D network on HMDB51 just like you. My loss goes down from 4.8 to 0.02. But test accuracy is very low. It is only 1%. Did you meet similar problem like me? And I will be appreciate if you share your trained model and solver on HMDB51. Thanks a lot!

from c3d.

VigneshSrinivasan10 avatar VigneshSrinivasan10 commented on July 22, 2024

@Michael-Guo, Please check ur training accuracy. If it is saturating, then ur network isnt learning anything. It has simply over-fit to ur training set.

If I were you, I would look at the input data again. Good Luck!

from c3d.

Michael-Guo avatar Michael-Guo commented on July 22, 2024

@vignesh10 It is a good idea! But what's the meaning of word 'ur'?

from c3d.

VigneshSrinivasan10 avatar VigneshSrinivasan10 commented on July 22, 2024

Sorry for the slang.. it is your*

  • saves two letters worth of typing effort..

from c3d.

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.