Dali: How to get images labels by ops.FileReader?

Created on 31 Oct 2018  ·  5Comments  ·  Source: NVIDIA/DALI

when I get to know the method 'ops.FileReader', which has parameter 'file_list'.
my code is as follows:

   self.input = ops.FileReader(file_root = image_dir,file_list=file_list)

but got error:
RuntimeError: [/opt/dali/dali/pipeline/operators/reader/loader/file_loader.h:109] Assert on "s.is_open()" failed
The problem is about file_list.
if remove file_list, it works well,but the label the FileReader it returns is not expected.

question

Most helpful comment

Hi,
Please check docs/examples/getting started.ipynb how to use file_list.
Basically, inside the file list, you have filed in the path relative to file_root and then white space separated number of class that is assigned to given image.

All 5 comments

Hi,
Please check docs/examples/getting started.ipynb how to use file_list.
Basically, inside the file list, you have filed in the path relative to file_root and then white space separated number of class that is assigned to given image.

If that doesn't help you please reopen.

@yjjiang11 Hi, I meet the same problem. Could you please tell me how did you solve it?

@XiaoqiangZhou - please check this example and this file.

@JanuszL Got it! Thanks for your help~

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonJJJ picture simonJJJ  ·  3Comments

samra-irshad picture samra-irshad  ·  3Comments

tianyang-li picture tianyang-li  ·  4Comments

frank-wei picture frank-wei  ·  3Comments

dhkim0225 picture dhkim0225  ·  4Comments