Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: num_samples should be a positive integer value, but got num_samples=0 #13

Closed
LightingMc opened this issue Aug 31, 2020 · 13 comments

Comments

@LightingMc
Copy link

Hey,
So I downloaded the git and downloaded the data set into a subfolder inside the git. The installation of echonet went fine. But I get this error no matter I try to run any of the given functions.

image

I have tried renaming the downloaded folder with the .csv files and the videos, and have also edited that echonet.cfg file. I don't really understand what is going on.

@douyang
Copy link
Collaborator

douyang commented Sep 2, 2020

This is an issue with file path, please change the .cfg to where you expect the videos. If videos are not present at the expected path, num_samples will return 0.

@douyang douyang closed this as completed Sep 2, 2020
@LightingMc
Copy link
Author

Hey, thanks for the reply and sorry for bothering you so much. I tried two approaches.

  1. So in this git's repo I created a new folder with the name of a4c-video-dir. It has all of the videos.

image

I also copy-pasted the two .csv files into this folder

image

But I still get the same error.
image

  1. Created another folder with the name of a4c-video-dir which had three items in it: the 2 csv files and a folder named Videos with all the videos in it. Still got the same errors

@LightingMc
Copy link
Author

and I also tried these two above methods by editing the echonet.cfg file with a new folder name and tried methods 1,2 described before. Still got the same errors.

@douyang
Copy link
Collaborator

douyang commented Sep 9, 2020

We've noticed a few errors like this when using a version of pytorch and torchvision different from requirements.txt. Please try using those versions and let us know if still getting that error.

@LightingMc
Copy link
Author

Hey,
Thanks a lot for reaching back. I tried to install a conda env. from the requirements given. I did:

conda create --name Dynamic --file requirements.txt

But it doesn't work and gives me the following error:
image

Do you know how I could resolve this issue?

@LightingMc
Copy link
Author

LightingMc commented Sep 17, 2020

I am trying to do your thing. But need to know something. What is the file/tree structure of the a4c-video-dir?

For me doing ls a4c-video-dir gives FileList.csv Videos VolumeTracings.csv, where the Videos folder contains all of the videos.

image

@LightingMc
Copy link
Author

The issue was resolved. The issue was that in the data provided to us via box, the .csv files that I got had .avi after the video file names. Your code for reading the videos assumes that they didn't have .avi after the video file names.

@douyang
Copy link
Collaborator

douyang commented Sep 23, 2020

Thanks so much for the update! We will update the CSV to reflect that.

@atanuGuin
Copy link

atanuGuin commented Dec 22, 2020

@Beep-Boop-Bopa, could you please let me know your echonet.cfg configuration? All the videos and 2 csv files are kept at path:
/workspace/xxx/yyy/dynamic/a4c-video-dir
and my echonet.cfg containes the DATA_DIR path as follows:
(my_syft_env) root@380b6b959170:/workspace/xxx/yyy/dynamic# cat echonet.cfg
DATA_DIR =/workspace/xxx/yyy/dynamic/a4c-video-dir/

Thanks in advance.

@LightingMc
Copy link
Author

In my experience, the echonet.cfg file thing doesn't really work that well. So I am not using it at all. I don't have a .config file. The python file which does "import echonet" is in the same directory as a4c-video-dir.

Right now, my code has .avi in it and is working. I dunno why.

@LightingMc
Copy link
Author

Just try with and without the .avi extension in the csv files and see what works.

@chinmayabv
Copy link

Hi Im running into some issues and unable to figure out the contents of the csv file. Can you please provide me with a sample FileList.csv or the headers that need to be in it?
Screenshot from 2021-04-23 21-35-26

@chahalinder0007
Copy link
Contributor

chahalinder0007 commented Apr 24, 2021

@chinmayabv
It seems you are not having the split column in your csv, the column determines if we are going to use a particular example for training validation or test
The sample csv looks like this:

Filename,EF,ESV,EDV,FrameHeight,FrameWidth,FPS,Frame,Split
0X100009310A3BD7FC.avi,78.49840597,14.88136797,69.21053366,112,112,50,174,VAL
0X1002E8FBACD08477.avi,59.10198811,40.38387624,98.74288352,112,112,50,215,TRAIN
0X1005D03EED19C65B.avi,62.36379841,14.2677839,37.90973395,112,112,50,104,TRAIN
0X10075961BC11C88E.avi,54.54509675,33.14308352,72.91420979,112,112,55,122,TRAIN
0X10094BA0A028EAC3.avi,24.88774165,127.5819446,169.8550242,112,112,52,207,VAL
0X100CF05D141FF143.avi,55.95179045,47.45383119,107.7315779,112,112,50,248,TEST
0X100E3B8D3280BEC5.avi,36.57373876,81.74728111,128.8855429,112,112,38,101,TRAIN
0X100E491B3CD58DE2.avi,33.99174499,76.86556916,116.4484187,112,112,50,226,TRAIN
0X100F044876B98F90.avi,69.31525203,25.13140943,81.90195812,112,112,50,221,TRAIN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants