Object Detection in Tensorflow
A collection of functions that allow to perform object detection using any model from the zoo in Tensorflow. The goal is to be able to integrate the Tensorflow Object Detection API easily in other projects, allowing transfer learning and training in Google Colab. In order to use it you should choose a model from the Model Zoo, and preprocess your data to follow the given format below. An example is given in HandDet.
The current version on master has been tested with Tensorflow 2.2, but there's a tag for an older version compatible with Tensorflow 1.
Installation
python -m venv env
source env/bin/activate
pip install -r requirements.txt
Most of the installation for the Tensorflow Object Detection API is done in objdet/tfapi.py
. However, you might still need to install protobuf
on your own because I don't want to force any OS.
Data Format
In order to convert your data to TFRecords using tfrecords.py
you need: A data folder that contains subdirectories such as train
, test
and validation
. Each subdirectory contains .jpg
images and a .csv file called labels.csv
with the following fields: frame, xmin, xmax, ymin, ymax, class_id
Acknowledgements
This project was inspired by https://github.com/RomRoc/objdet_train_tensorflow_colab