This repository contains an image processing pipeline designed for the manipulation and analysis of images from the WheatSeedBelt Dataset. These images are associated with the research paper titled Detection of Fusarium Damaged Kernel in Wheat Using Deep Semi-Supervised Learning on a Novel WheatSeedBelt Dataset.
To extract the RoIs (Regions of Interest) from the original .npy images, you might need to run the following commands:
python3 image_converter.py --config configs/image_converter.yaml
python3 segmentor_pipeline.py --config configs/segmentor.yaml
python3 extractor_pipeline.py --config configs/extractor.yaml
Note that before doing each step, you should change the corresponding config files to point to the correct directories.
The image_converter.py
script converts the original .npy images to
standard .npy images with conventional intensity values (0-255). This script,
however, is not necessary if you already have the standard images with
conventional intensity values (0-255).
Note that the image_converter
script works with directories. So, the right
paths to the directories should be provided in the config file.
For the segmentor_pipline
, you should provide the path to a .csv file that
includes the paths to the images with the names of the following column:
PackageID
, ImageID
, Image
, Label
(see the sample methadata and the dataset)
For the extractor_pipeline
, you should provide the path to a .csv file
generated by the segmentor_pipeline
script.
Deep CNN pipeline for classification of wheat kernels into two or three classes:
python3 experiment.py --config configs/experiment.yaml
Simply change the config
file to point to the correct model, config files, paths, and directories for training the model.
The correct model names are listed as:
EFFICIENTNET_B0
toEFFICIENTNET_B5
RESNET18
toRESNET101