Home > Mobile >  Download pictures with URL for CNN
Download pictures with URL for CNN

Time:08-31

I want to build a CNN for regression purposes. My data frame includes product_id, picture_url and the price. I want to loop through the image url to get them and further to feed to my neural network.

What is the most optimal way to store images for that purposes? And what function to employ?

CodePudding user response:

I suggest you to map each features of the image into the same data frame. You can use labmda function to map

CodePudding user response:

I decided to change my approach and to download pictures to local memory.

full['picture_url'].apply((lambda row: ignore_exception(wget.download(row),row)))

Ignore exceptions is created to avoid errors such as 404 and etc.

  • Related