Skip to content

Drei-E3/KIP_seminar_fraeser

Repository files navigation

Image Processing and Modeling Toolkit

This project is a comprehensive suite of tools designed for various image processing tasks including augmentation, cropping, grayscaling, and a set of operations related to modeling. The toolkit is structured around a Python-based application (app.py) that serves as the entry point to use the four individual scripts:

  • augumentation.py: For image augmentation operations.
  • cropping.py: To crop images to specified dimensions.
  • grayscaling.py: For converting images to grayscale.
  • modeling.py: To control our model operations such as training, evaluating, and applying the model to predict wear of cutting tools for milling machines.
  • segmentation.py:
  • wear_measurement.py:

Getting Started

Prerequisites

Ensure that Python 3.x is installed on your system. The scripts also require additional libraries, details of which can be found in the requirements.txt file. Install the required Python libraries using:

pip install -r requirements.txt

or use conda

conda env create -f environment.yml

Installation

Clone the repository or download the source code to your local machine. Ensure all scripts (augumentation.py, cropping.py, grayscaling.py, modeling.py, and app.py) are in the same directory, or adjust the paths in app.py accordingly.

Running the Application

Navigate to the project directory and run the following command in the terminal:

python app.py

Follow the on-screen prompts to select the desired operation and provide necessary inputs as requested.

Features

  1. Image Augmentation

    • Perform various image transformations like rotation, scaling, and flipping to augment your image dataset.
  2. Image Cropping

    • Crop images to a specified width and height.
  3. Image Grayscaling

    • Convert color images to grayscale, optionally categorizing pixel values into classes.
  4. Model Operations

    • Manage operations related to a machine learning model, including training, loading, evaluating, and making predictions.

Usage

Upon launching app.py, you will be presented with a menu to choose from the following options:

  1. Image Augmentation: Enter paths for input and output directories.
  2. Image Cropping: Provide input and output directory paths along with the desired dimensions for cropping.
  3. Image Grayscaling: Specify the directories for reading and writing grayscale images.
  4. Model Operations: Choose from loading, training, or evaluating the model, and provide necessary paths (images folder and masks folder). When you just use the package, after you initiation model = WearDetector() you should call model.load_data() function for training the model (both of model.train() and model.grid_search_train()). And use model.evaluate(X,y, verbose=1) and model.predict( images_dir, verbose=0) for evaluation and prediction base on the dataset you give (X,y as well as images_dir).

Contributing

Contributions to enhance functionalities or improve the efficiency of existing scripts are welcome. Please fork the repository and submit a pull request with your updates.

recommand process

KIP_seminar_fraeser

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published