Methodology

Implementing the Faster RCNN Inception V2 2018 and the SSD Mobilenet V1 2017 Models

Prior to initiating data collection and training, establishing a Tensorflow and Anaconda environment with default Python package imports (e.g. Numpy, Anaconda’s Protobuf, lxml, Cython, and Opencv) was necessary. Following package construction, the object detection model was then downloaded from the Tensorflow Model Zoo, a holding repository for all current models in both object detection and image classification. In this case, both the Faster-RCNN-Inception-V2-COCO  and SSD Mobilent V1 2017 models were packaged and installed into the directories for testing.
Additionally, the official Tensorflow/models repository was extracted in order to obtain the correct files needed to work with the model. After importing packages and setting up the environment for training, we had tested the setup in order to verify that it was successful by running an object detection tutorial in the Jupyter notebook. In order to train our object detector, we had created our custom file of dark field microscopy images of Syphilis and Malaria. In addition, we had created verification boxes of every instance of the targeted objects in each image to be created into a .xml file for training, using LabelImg. We had focused on a small number of images, resulting in a total of 31 for Syphilis and 31 for Malaria. The .xml files were then converted to .csv files in order to be read by Tensorflow. We then made our own label map with two classes: class 1 for Malaria and class 2 for Syphilis in order to train the classifier to detect these objects. The last method was to configure the object detection training pipeline. Since the pipeline defines which model and what parameters will be used for training. In the configuration file, the num_classes, fine_tune_checkpoints, num_examples were altered in addition to the train_input_reader and eval_input_reader sections to fit our custom path directories. After this has been completed, the model was then trained through the Anaconda command prompt. The live data indicating loss values was then recorded via Tensorboard.