p2irc / deepplantphenomics

Deep learning for plant phenotyping.
GNU General Public License v2.0
135 stars 46 forks source link

Parsing Error in load_Multiple-labels_from_csv ? #41

Closed DryFrost closed 5 years ago

DryFrost commented 5 years ago

when running load_Multiple-labels_from_csv then model.load_images_with_ids_from_directory I get an error where it states that it couldn't find the images. Looking at the error it looks like it is not parsing the name correctly as the characters "" are not in the csv file for the name of the files.

File "C:\Users\Dane Nguyen\Anaconda3\envs\dl4cv\lib\site-packages\deepplantphenomics\deepplantpheno.py", line 1867, in load_images_with_ids_from_directory assert len(path) == 1, 'Found no image or multiple images for %r' % image_id AssertionError: Found no image or multiple images for 'C1_06-14-2019_EXP2_A1.png'

DryFrost commented 5 years ago

Same issue when invoking the load_ippn_dataset command. 10:59PM: Initializing queue runners... WARNING:tensorflow:From C:\Users\Dane Nguyen\Anaconda3\envs\dl4cv\lib\site-packages\deepplantphenomics\deepplantpheno.py:203: start_queue_runners (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version. Instructions for updating: To construct input pipelines, use thetf.datamodule. 10:59PM: Beginning training... WARNING:tensorflow:From C:\Users\Dane Nguyen\Anaconda3\envs\dl4cv\lib\site-packages\deepplantphenomics\deepplantpheno.py:701: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead. WARNING:tensorflow:From C:\Users\Dane Nguyen\Anaconda3\envs\dl4cv\lib\site-packages\deepplantphenomics\deepplantpheno.py:701: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead. 0%| | 0/15000 [00:00<?, ?it/s]2019-10-10 22:59:40.457423: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Not found: NewRandomAccessFile failed to Create/Open: .\dataA\C1_06-14-2019_EXP2_A1_rgb.png : The system cannot find the file specified. ; No such file or directory

donovanlavoie commented 5 years ago

Some of this may be a problem with how DPP reads text, but some of it also has to do with text encodings. The first error seems to indicate that that file is encoded with UTF-8 but is being read as CP-1252, the default encoding on Windows, since  is a common mis-encoding of the hidden BOM marker in UTF-8. The second one is more obscure, however.

Either way, I've made some changes so that DPP expects UTF-8 files (b0a5fcbcfc497e05d9f4ac2ca96dd754a2b9dd63). You can try again and see if it works. If not, check that your files are UTF-8, and resave them as that if they're not (which should be possible in Notepad).

Let us now about further issues with this, particularly if the second error isn't resolved; what would even turn into box drawing characters anyway?

jubbens commented 5 years ago

@DryFrost can you let us know if b0a5fcb solves your issue?