This Python script uses a deep learning model to classify images as either a product or an application. The classification is performed on a CSV file containing image links. The script provides an option to use multi-threading for faster processing.
Make sure to install the following dependencies:
- pandas
- tensorflow
- numpy
- requests
- sickit image
- matplotlib
- PySimpleGUI
You can install them using the following command:
pip install pandas tensorflow numpy requests scikit-image matplotlib PySimpleGUI
-
Change the Model Path: Update the model path in the script to point to your trained deep learning model.
Nour4 = load_model('Model\\Nour4.h5')
-
Run the Script: Execute the script, and a GUI window will appear.
python LightClassifier.py
-
Select CSV File: Click the "Select CSV File" button and choose a CSV file containing image links.
-
Choose Multi-Threading (Optional): Check the "Use Multi-Threading" checkbox for faster processing.
-
Submit: Click the "Submit" button to start the image classification process.
-
View Results: The classification results will be displayed on the GUI. Optionally, you can view the processing logs by clicking "View Logs."
-
Done: Click the "Done" button when the processing is complete.
If you want to review processing logs, you can click "View Logs" to open the log viewer window(currently under development).
- The script loads images from the provided links and classifies them using the specified deep learning model.
- If an image is classified as an application, the script searches for a product image in the CSV file and validates it using the model.
- The processed CSV file is updated with the classification results.
Note: Ensure that your model file, CSV file, and image links are correctly specified in the script.
Feel free to customize the script according to your requirements.