This code is used by the Debug project in order to classify male and female Aedes Aegypti mosquitoes for release in an IIT program. Images of the mosquitoes are taken in mechancial sorters and then classified on the likelihood of the image being of a male and thus can be accepted for release.
More details are described in our paper:
Note that while the code is released under the Apache license, the related data and pretrained models can only be used for academic/experimental purposes without prior consent. For more details, please see the LICENSE_DATA file.
In order to request access to the data and/or pretrained models, please fill out the following form.
Training and eval data is stored in TFRecord's of tf.Example
messages in two
directories (train and test). Each tf.Example
must have the following items:
- image/encoded - A greyscale encoded image.
- image/format - The format that the image is encoded in (e.g. png)
- label - A string specifying the label for the image.
To test locally, modify the input/output folders appropriately, and run
bazel -c opt learner -- \
--schedule='train_and_evaluate' \
--hparams='' \
--output_dir=$dev_model_dir \
--data_dir=$data_dir \
--read_q_capacity=128 --shuffle_q_capacity=128 --shuffle_q_threads=2 \
--save_summary_steps=5 \
--save_checkpoints_secs=60 \
--evals_per_ckpt=3 \
--eval_delay_seconds=1 \
--logtostderr
For inference in a production environment, first export in SavedModel format. Unless
otherwise specified, the export script writes to $model_dir/export_
.
bazel run export -- --model_dir=$model_dir --logtostderr
Then, SavedModel can be used for inference with Tensorflow Serving or the GCP ML Engine.