Skip to content

fatihkaan22/pollen-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Pollen Grain Recognition

Requirements

  • CUDA 10.1
  • tensorflow 2.3.1
  • tensorflow-gpu 2.3.1
  • Tensorflow Object Detection API

Import Saved Models

Importing and evaluating of saved models requires a model file and label map file. Models can be downloaded from the following table

ModelClassification Level
EfficientDet D1Species
SSD ResNet50 V1 FPNSpecies
Faster R-CNN ResNet50Species
SSD ResNet50 V1 FPNFamily
EfficentDet D1Family

Labelmaps are located in data path. Label map should be selected according to classification task (species/family).

Importing and running of models are demonstrated in the following notebook files:

Train Custom Model

The models are initialized with the pre-trained models from TensorFlow 2 Detection Model Zoo .

Models based on the TensorFlow object detection API need a special format for all input data, called TFRecord. TensorFlow also requires a label map pbtxt file, which maps each of the used labels to integer values. This label map is used both in the training and detection processes. For 2 different models, we need two label maps and two TF record’s generated using those label maps. Labelmaps are located in data path.

In order to know which species belong to which family, a family_map.yaml file is created where keys are the family names and values are the species belonging to that family. This file is used to map each species to a family and generate family record files from pollen images and annotation files.

Script that generates TFRecord’s can be found in utils directory. Annotation files are expected in the same directory and with the same name of the image file. Paths of generated files are selected as workspace/data/species and workspace/data/family directories.

Training and evaluation process of EfficientDet D1 is demonstrated in the following notebook file: