Select a folder with images. Tensorflow will create a new name of the images based on their content.
This script uses TensorFlow to perform object detection on a set of image files in a specified folder. It identifies the object in each image, renames the image file to include the predicted object name, and adds a version number if necessary to avoid overwriting existing files.
tkinter: for the GUI used to select the folder.tensorflow: for the image processing and object detection.
To install these dependencies on IntelMac, you can use the following command:
pip install tkinter tensorflowM1 To install these dependencies, you can use the following command:
Miniconda3 macOS Apple M1 64-bit pkg from https://docs.conda.io/en/latest/miniconda.html
Open terminal and run these lines separate:
conda install -c apple tensorflow-deps pip install tensorflow-macos pip install tensorflow-metalconda install notebook -y
pip install numpy --upgrade pip install pandas --upgrade pip install matplotlib --upgrade pip install scikit-learn --upgrade pip install scipy --upgrade pip install plotly --upgrade
- Install the dependencies listed above.
- Put your images in a folder.
- Run the script. Open terminal, type cd "path to folder", hit enter. Then tpye "python3 RenameImageAI Tensorflow Github.py" .
- A GUI window will appear allowing you to select the folder containing the image files.
- The script will process each image file in the selected folder, renaming them with the predicted object name and a version number if necessary.
- The original image files will be replaced with the renamed files.
Note: The script expects the image files to be in JPEG or PNG format, and will only process files with those extensions. If the script encounters any errors during processing, it will print an error message but continue processing the remaining images.

