Skip to content

USask-BINFO/WheatSeedBelt

Repository files navigation

WheatSeedBelt

Image Processing Pipeline


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.

RoI Extractor Pipeline

An overview of the pre-processing pipeline developed for wheat kernel images. First, we use a center crop to remove boundary noise or artifacts that may adversely affect segmentation accuracy. This is followed by color conversion, segmentation, mask cleaning, then the extraction of regions of interest and relevant texture-level features recorded as feature vectors.

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 to EFFICIENTNET_B5
  • RESNET18 to RESNET101

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages