Coder Social home page Coder Social logo

test-pdi's Introduction

Image Analysis for Detection of Potential Mosquitoes Breeding Sites

Abstract

The goal is to create a system that uses deep learning to detect whether or not a specific image contains potencial sites for mosquitoes reproduction, using object detection. This can be applied for preventing diseases spread such as Dengue or Zika.

Risky sites include areas with still water. In this project we will consider: plant pots, empty bottles, car tires, rubble areas.

Author

Bruno Gabriel Cavalcante Lima, [email protected]

Folder contents:

  • /db - image database
  • /exp - experiments
  • /ref - references, papers, links, files, videos, etc
  • /rep - report, paper containing all pertinent report
  • /res - results, data, graph, etc
  • /src - source files, code here

Specific Objectives

The goal of the project is to train a object detection system using TensorFlow. The project consists of:

  1. Collecting images for each class (tire, rubble, bottles, water tank, plant pot)
  2. Create the images bounding box (one .xml file for each image collected)
  3. Divide each class into training and test
  4. Generate the .tfrecord (TensorFlow default extension for dataset).
  5. Choose a network model and configuration
  6. Train the model and export the frozen inference graph (.pb file)
  7. Test the results

Details for each step

  1. Used two main sources for getting images: GoogleImages and ImageNet. The aim was to group approx. 300 images for each class. In order to download from Google, there is this nice script from atif93. To download from a URL list (to be used with ImageNet), you can use getImagesFromURLs.py from tfvieira. I added the functions for directory cleaning and images choosing within a folder.

  2. To create the annotations, Tzutalin's LabelImage software can be used. After you define the classes you have, it generates the .xml once you specify the bounding boxes at for each image. In later steps, you will need to have your class-labels.pbtxt. Samples of classlabels can be found here.

  3. To split dataset into training_set and test_set folders, we have this train_and_test_splitter.py. It shuffles the data and divide into two folders, with the fraction you specify for training.

  4. The .xml files can be converted to .csv, and then to .record using the scripts present in Racoon Object Detection repository, called generate_tfrecord.py.

  5. In order to train your network, you first need to have its configuration. Configuration samples: here. Also, if you choose to use a pre-existing model, you can use some pre-trained checkpoints and its features. Pre-trained models: here. The goal is to reach a loss that is smaller than 1. After you get to it, you need to export a frozen inference graph. There is a script that does this in TensorFlow object detection repository.

  6. In the same repository you can find a Jupyter Notebook script showing all the necessary steps to test your trained network.

In the configuration samples, you basically need to search for the PATH_TO_BE_CONFIGURED in the .config files. They are:

  • fine_tune_checkpoint - If you are using pre-trained models
  • train_input_reader (input_path) - Path to the train.record generated in step 4.
  • train_input_reader (label_map_path) - Path to the class-labels.pbtxt for your training model.
  • eval_input_reader (input_path) - Path to test.record
  • eval_input_reader (label_map_path) - Path to the class-labels.pbtxt for your testing model. Can be the same as for train.

First results

We tested SSD MobileNet model, but we got better results with Faster RCNN Resnet COCO 50.

Configuration files used for the training can be found in src/training002 Initially we trained with only one class: tire. This way we could learn how the training proccess works. The first results are avaliable in res/training002_tire_test. Image tire_test_01 show images from test_set, while tire_test_02 show new images, not used in training nor test.

Status

Generating annotations for rubble class.

References

Pre-trained object-detect model checkpoints

Samples for object-detect configuration files

Samples for object-detect class labels

How to train your own Object Detector with TensorFlow’s Object Detector API

Understanding SSD MultiBox — Real-Time Object Detection In Deep Learning

Object detection with TensorFlow: Black and white pawns

LabelImage annotation software

test-pdi's People

Contributors

bglima avatar

Watchers

Devesh pareek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.