O
O
OCCASS OCCASSOVICH2020-08-31 20:45:17
Python
OCCASS OCCASSOVICH, 2020-08-31 20:45:17

How to make a DataSet from a folder with photos?

Hello! I have a folder with photos, how to make a DataSet for tensorflow out of it. I looked DataSet fashion there archive with "*.gz" extension. When I do like this:

with open("train-images-idx3-ubyte.gz", "rb") as file:
    train_images = extract_images(file)
print(train_images)

I am getting an array. How to do the same with a folder?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2020-09-01
@OCCASS

You could also google it if you understand python:
extract_images
With this command, images from the archive are loaded into a 4D numpy array. First, this command is deprecated; it is recommended to use tf.data
Secondly, here , it seems to me, an exhaustive explanation of what and how to do has been googled.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question