This tool allows you to perform various feature extraction techniques on images, either individually or in batches. It supports transformations such as FFT (Fast Fourier Transform), LBP (Local Binary Patterns), Gabor Filters, and Statistical Features extraction.
- Clone the Repository:
git clone https://github.com/x-CK-x/Feature-Extraction-Tool.git cd Feature-Extraction-Tool
- Create the Conda Environment:
conda env create -f environment.yml
- Activate the Environment:
conda activate feature_extraction_env
- Navigate to the Script Directory:
cd <directory_where_script_is_located>
- Run the Script:
python feature_extraction_gui.py
- Access the Gradio Interface:
After running the script, a local URL will be provided. Open this URL in your web browser to access the Gradio interface.
This feature allows you to apply various feature extraction techniques to a single image.
- Upload an Image: Use the image upload button to upload an image.
- Select a Transformation: Choose from FFT, LBP, Gabor, or Statistical features using the radio buttons.
- Process the Image: Click the "Process" button to apply the selected transformation and view the result.
This feature allows you to process multiple images in one or more folders concurrently.
- Add Input Folder Paths: Use the multi-select dropdown to add multiple input folder paths.
- Specify Output Folder Path: Enter the path where the results will be saved.
- Select Transformations: Choose which transformations to apply (FFT, LBP, Gabor).
- Run the Batch Processing: Click the "Run" button to start batch processing.
Output:
- For each image, a text file containing the mean, variance, skewness, and kurtosis values will be saved in the output folder.
- Transformed images will be saved in respective sub-folders (FFT, LBP, Gabor) within the output folder.
Documentation
The Documentation tab provides detailed information about the tool's features and usage.
The tool scans the input folders for corrupted or unsupported image files before starting the batch processing. These files are displayed in the terminal and are ignored during the processing.
- jfif
- jpeg
- jpg
- bmp
- png
- tif
- webp
This tool allows you to manage your image dataset by detecting and moving corrupted/unsupported images, as well as identifying and handling duplicate images.
- Detect and Move Bad Files: Detects corrupted or unsupported image files and moves them to a specified output folder while preserving the directory structure.
- Detect and Move Duplicates: Identifies duplicate images across multiple input folders and moves them to a 'duplicates' folder within the mirrored directory structure in the output folder.
- Select Input Folders: Use the dropdown menu to add multiple input folder paths.
- Specify Output Folder: Enter the path where the results will be saved.
- Choose Number of CPUs: Use the slider to select the number of CPUs for concurrent processing.
- Select Mode: Choose between "Detect and Move Bad Files" and "Detect and Move Duplicates".
- Run the Process: Click the "Run" button to start the processing.
-
Detect and Move Bad Files:
-
Scans the selected input folders for corrupted or unsupported images.
-
Moves identified bad files to the output folder, preserving the directory structure.
-
Detect and Move Duplicates:
-
Scans the selected input folders for duplicate images using SHA-256 hashing.
-
Moves duplicate images to a 'duplicates' folder within the mirrored directory structure in the output folder.
-
Keeps the less compressed image format if duplicates with different file types are found.
conda activate feature_extraction_env
python detect_and_move_bad_files.py