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

file_list - the parameters of ops.FileReader #31

Closed
zhengge opened this issue Jul 9, 2018 · 4 comments
Closed

file_list - the parameters of ops.FileReader #31

zhengge opened this issue Jul 9, 2018 · 4 comments

Comments

@zhengge
Copy link

zhengge commented Jul 9, 2018

| - file_list : string
| Path to the file with a list of pairs file label
| (leave empty to traverse the file_root directory to obtain files and labels) (default value: ``)

self.input = ops.FileReader(file_root='images/kitten', file_list='file_list.txt') is wrong.
The 'file_list.txt' is

cat_9.jpg kitten
cat_1.jpg kitten

RuntimeError: [XXXXX/DALI/dali/pipeline/operators/reader/loader/file_loader.h:104] Assert on "Size() > 0" failed: No files found.
Could you give me a example of file_list?
Thanks!

@JanuszL
Copy link
Contributor

JanuszL commented Jul 9, 2018

Hi,
file_list expects following format:
file_name_N[string] label_M[int]
Please try:
cat_9.jpg 0
cat_1.jpg 0
We will add more sanity check logic to the data loader and extend documentation as well.

@zhengge
Copy link
Author

zhengge commented Jul 10, 2018

@JanuszL
Thanks.

@JanuszL JanuszL closed this as completed Jul 10, 2018
@austinmw
Copy link

austinmw commented Nov 16, 2020

Hi @JanuszL , I'm trying to use a file list with subdirectories that represent different videos, for example:

11-EO.mp4_0/11-EO.mp4_0-001.jpg
11-EO.mp4_0/11-EO.mp4_0-002.jpg
11-EO.mp4_0/11-EO.mp4_0-003.jpg
12-EO.mp4_0/12-EO.mp4_0-001.jpg
12-EO.mp4_0/12-EO.mp4_0-002.jpg
12-EO.mp4_0/12-EO.mp4_0-003.jpg

However, it seems the file path that is created ends up cutting off the beginning digits:

File mapping failed: /home/user/project/images/-EO.mp4_0/11-EO.mp4_0-001.jpg

@JanuszL
Copy link
Contributor

JanuszL commented Nov 16, 2020

@austinmw - I'm sorry but I cannot reproduce your bug. Can you provide a simple, self-contained repro we could run on our side?
Also please check how it works with the latest DALI release as well as the latest nightly build.

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

3 participants