Thanks to visit codestin.com
Credit goes to github.com

Skip to content

read in-memory CSV file with remote URLs as image locations #15

@nickkimer

Description

@nickkimer

Thanks for writing this package -- I am running into an issue where I have an in-memory CSV file that contains a column of labels, and another with the URL to each image. I am getting this issue where it is telling me that an int is not an iterable object. Any help would be much appreciated!

images = Images(images='my_file.csv', 
                config=[
                        'header', 
                        f"image_col={url_column_index}", 
                        f"label_col={label_column_index}",
                        'resize=(224,224)',
                        'norm=pos',
                        'stream'
                        ],
                augment=[
                         'flip=horizontal'
                         ]
                )
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-100-d668b8a77e1c> in <module>()
      9                         ],
     10                 augment=[
---> 11                          'flip=horizontal'
     12                          ]
     13                 )

4 frames
/usr/local/lib/python3.6/dist-packages/gapcv/vision.py in _loadCSV(self)
    489             if is_memory:
    490                 image = ast.literal_eval(image)
--> 491                 image = np.asarray([np.asarray(img).astype(self._dtype) for img in image])
    492 
    493             image, shape, size, name, _type, error = function(image)

TypeError: 'int' object is not iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions