Skip to content
Advertisement

Tag: directory

How do I read two folders in a directory and combine them under one label using flow_from_directory?

Tensorflow/Keras I want to classify images into either “Circle”, “Square” or “Triangle”. I have a directory containing 6 folders with each shape having a separate “shaded” or “unshaded” folder. How can I combine them into one category? For example: shaded and unshaded circles will be given a label “0” using flow_from_directory. I will then feed this into my CNN model

Import functions from another directory

I am running a python script (app.py) where I have to use two functions from another script (src.py), located inside another directory. The structure is the following: I am using, in app.py, the following lines: to access to the functions odd_all, even_all declared inside src.py. However, I get the error: ModuleNotFoundError: No module named ‘src’. How could I solve this

Processing files in sorted order

I have 67 images in a directory with names as: Files are jpg files Im_260x_y where x is the number of images 1..67, y are 0, 1, 4, 8, 16, 32, 64, 128, 258. These files are randomly stored in the directory. I want to process the files in sorted order (same order which I have written above i.e Image

Advertisement