Skip to content

a-milosavljevic/aiaquami-training

Repository files navigation

AIAQUAMI Training Scripts

Training scripts for the AIAQUAMI project

Prerequisites

  • Training process relies on TensorFlow 2.9.3.
  • To be able to use TensorFlow 2.9.3 on GPU you must first install CUDA 11.2 and cuDNN 11.2.
  • After setting up CUDA and cuDNN, install project requirements listed in requirements.txt file.

Train model on a custom dataset

  1. Create root folder for the dataset and place images into data/data_original subfolder. Images for each class should be placed in a separate folder. Name of these folders should correspond to class names.
  2. In settings.py change value for root_folder variable to appropriate value.
  3. Reset experiment_no to 1 and check other parameters available in settings.py.
  4. Run prepare_data.py script to resize images and divide them into train, validation, and test subsets.
  5. Run train.py to train the model, generate confusion matrices and Grad-CAM heatmaps. Results will be saved to tmp dataset subfolder.
  6. In case training crushes due to lack of memory, reduce batch_size or choose smaller model and repeat training.
  7. Once training is finished, you may find results in tmp folder, under the current experiment subfolder.

Download pretrained models

Pretrained models are available for download in the repository release section:
https://github.com/a-milosavljevic/aiaquami-training/releases

Acknowledgement

This research was supported by the Science Fund of the Republic of Serbia, #7751676, Application of deep learning in bioassessment of aquatic ecosystems: toward the construction of automatic identifier of aquatic macroinvertebrates - AIAQUAMI.

About

Training scripts for the AIAQUAMI project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages