The main script runs the preproceessomg and augmentation scripts in sequence.
- File:
main.py - Description: Automates the execution of the preprocessing and augmenation scrupts by capturing their outputs and managing any errors
- Usage:
python3 main.py [stage] - Arguments:
stage: Specifies the dataset stage to process, with optionstest,train, orvalid
Example Command:python main.py test- Output: Runs both preprocessing and augmentation processes, saving results in their respective folders
This script preprocess the raw images based on bounding box annotations, cropping, and resizing them for the model input.
- File:
data_preprocessing.py - Description: Crops images based on bounding box coordinates based on teh CSV file and resizes each to a fixed size (128x128)
- Usage:
python3 data_preprocessing.py [stage] - Arguments:
stage: Specifies the dataset stage to process, with optionstest,train, orvalid
Example Command:python date_preprocessing.py test- Output: Cropped and resized images saved in the appropriate folder (data/train/processed_images)
This script applies transformations to the cropped images to increase dataset variability.
- File:
data_augmentation.py - Description: Applies data augmentation techniques to the cropped images, including slight rotations and color obscurations, to simulates real-world conditions
- Usage:
python3 data_augmentation.py [stage] - Arguments:
stage: Specifies the dataset stage to augment, with optionstest,train, orvalid
Example Command:python date_augmentation.py test- Output: Cropped and resized images saved in the appropriate folder (data/train/augmented_images)
This script processes the images from the dataset and converts them into 3D tensors suitable for input into a deep learning model
- File:
data_formatting.py - Description: Reads images from specified directories and organizes them into a structured tensor format that can be easily used in training and evalutation
- Usage:
- - Arguments:
- ``:
Example Command:-- Output: