Hi all, I have followed your tutorial for Fine-tuning SOTA video models on my own dataset, but when I run the script I got always the same error, it says “Could not load file xxxx.mp4/img_00xxx.jpg starting at frame xx. Check data path”, maybe it is related to using pickle to open the video.
I’m using Ubuntu in a virtualbox, so I can not use GPU.
Regards.
Hi, this error means the code can’t find the frame at xxxx.mp4/img_00xxx.jpg
. Please check that particular path to see if there is an image of that name, maybe it is a path error, or a naming error.
If you confirm the data is actually there, can you provide more details of your usage?
- What does your data text file look like?
- Are you using image loader or video loader?
- What is your MXNet and GluonCV version?
Thank you.
Hi, I don’t have images, in the documentation it says that instead of having images, you can use a folder with videos, so I have a folder with videos and the .txt has the name of the videos. I dont understand why it says img_0150.jpg for example, there are no images, neither the 1, neither the 150.
I’m using the code from https://gluon-cv.mxnet.io/build/examples_action_recognition/finetune_custom.html
I have also tested the option of using images, but then I got an exception- division by zero in the line:
Extract data and label
data = split_and_load(batch[0], ctx_list=ctx, batch_axis=0)
regards.
1 Like
Sorry for the late reply, if you are loading videos, then you need to modify the dataset function a bit. That tutorial is for loading images.
To be specific,
train_dataset = VideoClsCustom(root=YOUR_ROOT_PATH,
setting=YOUR_SETTING_FILE,
train=True,
new_length=32,
video_loader=True,
use_decord=True,
transform=transform_train)
This should work, please let me know how it goes.
1 Like
I’ve tried your code, the strange thing, is that now I’m getting the same problem that when using images, it breaks in the line
data = split_and_load(batch[0], ctx_list=ctx, batch_axis=0)
and the error
ZeroDivisionError: integer division or modulo by zero
maybe there is something to change in this code block for videos?
At the end I found that your reply is the solution, what happened to me is that I hadn’t GPU, and the code is done for GPU, what I did is to change what you suggested and in addition I changed the line:
ctx = [mx.gpu(i) for i in range(num_gpus)]
for
ctx = [mx.cpu(i) for i in range(num_gpus)]
so now I’m using my cpu in the context