Blog

Quickly build an object detector with the DeepDetect Platform

19 March 2021

This post describes how we quickly train object detectors at Jolibrain. As a tutorial we train a car detector from road video frames using the DeepDetect Platform that is a Web UI on top of the DeepDetect Server. All our products are Open Source.

Cars detection

At Jolibrain we are specialized in hard deep learning topics, i.e. for which no on-the-shelf product does yet exist. Everything else we automate and put into DeepDetect Server and Platform.

We’ve automated standard object detection a while ago. This is because detection is often the first step of automating a project in industry. Once the elements of interest have been localized in an image for instance, some more complex models can apply.

We use the DeepDetect Platform on a daily basis to train object detectors. It’s entirely Open Source, see how to install it.

Training object detectors with the platform is made extremely quick & easy with the following features:

  • Short & simple Jupyter notebook that contains everything, no code needed
  • Very simple object detection dataset format
  • Internal dataset checks + visual inspection within the notebook
  • Neural model change with a single string, no code needed
  • Automated data augmentation
  • Web UI for model monitoring and archiving
  • Integrated live training metrics
  • Model archiving with metrics
  • Model comparison built into the Web UI
  • Model publishing for inference

Below we detail the three steps to train an object detector, it should take 5 minutes overall, and training lasts 30 minutes on a standard GPU for an early model.

Model setup

From the DeepDetect Platform, open up the Jupyter notebook, the object detector template is pretty simple.

Object detector training notebook template

This template has preset values for a range of parameters. There are good as is for a first shot with very decent results and quick training time.

Note that advanced data augmentation, including pespective deformation and noise are included, and that the system uses an advanced optimizer named AMSGRAD with both lookahead and rectified options activated. This smoothes training and yields very good results quickly.

The notebook is available from the DeepDetect Platform directly and as part of our notebook examples on Github.

For an improved model, more computational model, two changes can be made:

  • change squeezenet_ssd for refinedet_512
  • set img_width and img_height to 512 and db_width, db_height to 1024.

Dataset review

Executing the notebook runs a background check on the dataset, and provides a way to visually inspect the dataset before training as well.

Object detection dataset review

The task at hands is on the road car detection, see a few samples below:

Training

Model training can start by clicking the Run training button in the notebook.

Model training notebook

The model then prepares for training, and can be monitored from the Web UI. Once ready, the GPU is put to work and the training begins.

From there, live metrics are reported on the Web UI.

Model training live metrics

Once training has finished, it’s listed on the platform.

Model listing

Using the model

After the model has finished training with satisfactory test accuracy, it can be published for using it in application with a REST API.

Cars detection