Skip to content
Branch: master
Find file History
pkulzc Object detection changes: (#7208)
257914648  by lzc:

    Internal changes

--
257525973  by Zhichao Lu:

    Fixes bug that silently prevents checkpoints from loading when training w/ eager + functions. Also sets up scripts to run training.

--
257296614  by Zhichao Lu:

    Adding detection_features to model outputs

--
257234565  by Zhichao Lu:

    Fix wrong order of `classes_with_max_scores` in class-agnostic NMS caused by
    sorting in partitioned-NMS.

--
257232002  by ronnyvotel:

    Supporting `filter_nonoverlapping` option in np_box_list_ops.clip_to_window().

--
257198282  by Zhichao Lu:

    Adding the focal loss and l1 loss from the Objects as Points paper.

--
257089535  by Zhichao Lu:

    Create Keras based ssd + resnetv1 + fpn.

--
257087407  by Zhichao Lu:

    Make object_detection/data_decoders Python3-compatible.

--
257004582  by Zhichao Lu:

    Updates _decode_raw_data_into_masks_and_boxes to the latest binary masks-to-string encoding format.

--
257002124  by Zhichao Lu:

    Make object_detection/utils Python3-compatible, except json_utils.

    The patching trick used in json_utils is not going to work in Python 3.

--
256795056  by lzc:

    Add a detection_anchor_indices field to detection outputs.

--
256477542  by Zhichao Lu:

    Make object_detection/core Python3-compatible.

--
256387593  by Zhichao Lu:

    Edit class_id_function_approximations builder to skip class ids not present in label map.

--
256259039  by Zhichao Lu:

    Move NMS to TPU for FasterRCNN.

--
256071360  by rathodv:

    When multiclass_scores is empty, add one-hot encoding of groundtruth_classes as multiclass scores so that data_augmentation ops that expect the presence of multiclass_scores don't have to individually handle this case.

    Also copy input tensor_dict to out_tensor_dict first to avoid inplace modification.

--
256023645  by Zhichao Lu:

    Adds the first WIP iterations of TensorFlow v2 eager + functions style custom training & evaluation loops.

--
255980623  by Zhichao Lu:

    Adds a new data augmentation operation "remap_labels" which remaps a set of labels to a new label.

--
255753259  by Zhichao Lu:

    Announcement of the released evaluation tutorial for Open Images Challenge
    2019.

--
255698776  by lzc:

    Fix rewrite_nn_resize_op function which was broken by tf forward compatibility movement.

--
255623150  by Zhichao Lu:

    Add Keras-based ResnetV1 models.

--
255504992  by Zhichao Lu:

    Fixing the typo in specifying label expansion for ground truth segmentation
    file.

--
255470768  by Zhichao Lu:

    1. Fixing Python bug with parsed arguments.
    2. Adding capability to parse relevant columns from CSV header.
    3. Fixing bug with duplicated labels expansion.

--
255462432  by Zhichao Lu:

    Adds a new data augmentation operation "drop_label_probabilistically" which drops a given label with the given probability. This supports experiments on training in the presence of label noise.

--
255441632  by rathodv:

    Fallback on groundtruth classes when multiclass_scores tensor is empty.

--
255434899  by Zhichao Lu:

    Ensuring evaluation binary can run even with big files by synchronizing
    processing of ground truth and predictions: in this way, ground truth is not stored but immediatly
    used for evaluation. In case gt of object masks, this allows to run
    evaluations on relatively large sets.

--
255337855  by lzc:

    Internal change.

--
255308908  by Zhichao Lu:

    Add comment to clarify usage of calibration parameters proto.

--
255266371  by Zhichao Lu:

    Ensuring correct processing of the case, when no groundtruth masks are provided
    for an image.

--
255236648  by Zhichao Lu:

    Refactor model_builder in faster_rcnn.py to a util_map, so that it's possible to be overwritten.

--
255093285  by Zhichao Lu:

    Updating capability to subsample data during evaluation

--
255081222  by rathodv:

    Convert groundtruth masks to be of type float32 before its used in the loss function.

    When using mixed precision training, masks are represented using bfloat16 tensors in the input pipeline for performance reasons. We need to convert them to float32 before using it in the loss function.

--
254788436  by Zhichao Lu:

    Add forward_compatible to non_max_suppression_with_scores to make it is
    compatible with older tensorflow version.

--
254442362  by Zhichao Lu:

    Add num_layer field to ssd feature extractor proto.

--
253911582  by jonathanhuang:

    Plumbs Soft-NMS options (using the new tf.image.non_max_suppression_with_scores op) into the TF Object Detection API.  It adds a `soft_nms_sigma` field to the postprocessing proto file and plumbs this through to both the multiclass and class_agnostic versions of NMS. Note that there is no effect on behavior of NMS when soft_nms_sigma=0 (which it is set to by default).

    See also "Soft-NMS -- Improving Object Detection With One Line of Code" by Bodla et al (https://arxiv.org/abs/1704.04503)

--
253703949  by Zhichao Lu:

    Internal test fixes.

--
253151266  by Zhichao Lu:

    Fix the op type check for FusedBatchNorm, given that we introduced
    FusedBatchNormV3 in a previous change.

--
252718956  by Zhichao Lu:

    Customize activation function to enable relu6 instead of relu for saliency
    prediction model seastarization

--
252158593  by Zhichao Lu:

    Make object_detection/core Python3-compatible.

--
252150717  by Zhichao Lu:

    Make object_detection/core Python3-compatible.

--
251967048  by Zhichao Lu:

    Make GraphRewriter proto extensible.

--
251950039  by Zhichao Lu:

    Remove experimental_export_device_assignment from TPUEstimator.export_savedmodel(), so as to remove rewrite_for_inference().

    As a replacement, export_savedmodel() V2 API supports device_assignment where user call tpu.rewrite in model_fn and pass in device_assigment there.

--
251890697  by rathodv:

    Updated docstring to include new output nodes.

--
251662894  by Zhichao Lu:

    Add autoaugment augmentation option to objection detection api codebase. This
    is an available option in preprocessor.py.

    The intended usage of autoaugment is to be done along with random flipping and
    cropping for best results.

--
251532908  by Zhichao Lu:

    Add TrainingDataType enum to track whether class-specific or agnostic data was used to fit the calibration function.

    This is useful, since classes with few observations may require a calibration function fit on all classes.

--
251511339  by Zhichao Lu:

    Add multiclass isotonic regression to the calibration builder.

--
251317769  by pengchong:

    Internal Change.

--
250729989  by Zhichao Lu:

    Fixing bug in gt statistics count in case of mask and box annotations.

--
250729627  by Zhichao Lu:

    Label expansion for segmentation.

--
250724905  by Zhichao Lu:

    Fix use_depthwise in fpn and test it with fpnlite on ssd + mobilenet v2.

--
250670379  by Zhichao Lu:

    Internal change

250630364  by lzc:

    Fix detection_model_zoo footnotes

--
250560654  by Zhichao Lu:

    Fix static shape issue in matmul_crop_and_resize.

--
250534857  by Zhichao Lu:

    Edit class agnostic calibration function docstring to more accurately describe the function's outputs.

--
250533277  by Zhichao Lu:

    Edit the multiclass messages to use class ids instead of labels.

--

PiperOrigin-RevId: 257914648
Latest commit fe748d4 Jul 15, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
anchor_generators Merged commit includes the following changes: (#6932) May 31, 2019
box_coders Merged commit includes the following changes: (#6932) May 31, 2019
builders Object detection changes: (#7208) Jul 15, 2019
core Object detection changes: (#7208) Jul 15, 2019
data Merged commit includes the following changes: (#6315) Mar 7, 2019
data_decoders Object detection changes: (#7208) Jul 15, 2019
dataset_tools Object detection changes: (#7208) Jul 15, 2019
dockerfiles/android Add TPU SavedModel exporter and refactor OD code (#6737) May 22, 2019
g3doc Object detection changes: (#7208) Jul 15, 2019
inference Rename deetection_inference.py to detection_inference.py (#6199) Feb 21, 2019
legacy Merged commit includes the following changes: (#6932) May 31, 2019
matchers Merged commit includes the following changes: (#6932) May 31, 2019
meta_architectures Object detection changes: (#7208) Jul 15, 2019
metrics Object detection changes: (#7208) Jul 15, 2019
models Object detection changes: (#7208) Jul 15, 2019
predictors Object detection changes: (#7208) Jul 15, 2019
protos Object detection changes: (#7208) Jul 15, 2019
samples Object detection changes: (#7208) Jul 15, 2019
test_ckpt Merged commit includes the following changes: Feb 1, 2018
test_data Merged commit includes the following changes: Feb 27, 2018
test_images Merged commit includes the following changes: Feb 27, 2018
tpu_exporters Object detection changes: (#7208) Jul 15, 2019
utils Object detection changes: (#7208) Jul 15, 2019
CONTRIBUTING.md Move the research models into a research subfolder (#2430) Sep 21, 2017
README.md Object detection changes: (#7208) Jul 15, 2019
__init__.py Move the research models into a research subfolder (#2430) Sep 21, 2017
eval_util.py Object detection changes: (#7208) Jul 15, 2019
eval_util_test.py Object detection changes: (#7208) Jul 15, 2019
export_inference_graph.py Object detection changes: (#7208) Jul 15, 2019
export_tflite_ssd_graph.py Merged commit includes the following changes: (#6932) May 31, 2019
export_tflite_ssd_graph_lib.py Merged commit includes the following changes: (#6315) Mar 7, 2019
export_tflite_ssd_graph_lib_test.py Minor fixes for object detection (#5613) Nov 2, 2018
exporter.py Object detection changes: (#7208) Jul 15, 2019
exporter_test.py Object detection changes: (#7208) Jul 15, 2019
inputs.py Object detection changes: (#7208) Jul 15, 2019
inputs_test.py Object detection changes: (#7208) Jul 15, 2019
model_hparams.py Merged commit includes the following changes: Feb 10, 2018
model_lib.py Object detection changes: (#7208) Jul 15, 2019
model_lib_test.py Minor fixes for object detection (#5613) Nov 2, 2018
model_lib_v2.py Object detection changes: (#7208) Jul 15, 2019
model_lib_v2_test.py Object detection changes: (#7208) Jul 15, 2019
model_main.py Fix Object detection API wrong argument when using run_once (#6010) Feb 10, 2019
model_tpu_main.py Minor fixes for object detection (#5613) Nov 2, 2018
object_detection_tutorial.ipynb Avoid class index overflow when using OIDv4 labels (#6641) Apr 23, 2019

README.md

Tensorflow Object Detection API

Creating accurate machine learning models capable of localizing and identifying multiple objects in a single image remains a core challenge in computer vision. The TensorFlow Object Detection API is an open source framework built on top of TensorFlow that makes it easy to construct, train and deploy object detection models. At Google we’ve certainly found this codebase to be useful for our computer vision needs, and we hope that you will as well.

Contributions to the codebase are welcome and we would love to hear back from you if you find this API useful. Finally if you use the Tensorflow Object Detection API for a research publication, please consider citing:
"Speed/accuracy trade-offs for modern convolutional object detectors."
Huang J, Rathod V, Sun C, Zhu M, Korattikara A, Fathi A, Fischer I, Wojna Z,
Song Y, Guadarrama S, Murphy K, CVPR 2017

[link][bibtex]

Maintainers

Table of contents

Setup:

Quick Start:

Customizing a Pipeline:

Running:

Extras:

Getting Help

To get help with issues you may encounter using the Tensorflow Object Detection API, create a new question on StackOverflow with the tags "tensorflow" and "object-detection".

Please report bugs (actually broken code, not usage questions) to the tensorflow/models GitHub issue tracker, prefixing the issue name with "object_detection".

Please check FAQ for frequently asked questions before reporting an issue.

Release information

July 1st, 2019

We have released an updated set of utils and an updated tutorial for all three tracks of the Open Images Challenge 2019!

The Instance Segmentation metric for Open Images V5 and Challenge 2019 is part of this release. Check out the metric description on the Open Images website.

Thanks to contributors: Alina Kuznetsova, Rodrigo Benenson

Feb 11, 2019

We have released detection models trained on the Open Images Dataset V4 in our detection model zoo, including

  • Faster R-CNN detector with Inception Resnet V2 feature extractor
  • SSD detector with MobileNet V2 feature extractor
  • SSD detector with ResNet 101 FPN feature extractor (aka RetinaNet-101)

Thanks to contributors: Alina Kuznetsova, Yinxiao Li

Sep 17, 2018

We have released Faster R-CNN detectors with ResNet-50 / ResNet-101 feature extractors trained on the iNaturalist Species Detection Dataset. The models are trained on the training split of the iNaturalist data for 4M iterations, they achieve 55% and 58% mean AP@.5 over 2854 classes respectively. For more details please refer to this paper.

Thanks to contributors: Chen Sun

July 13, 2018

There are many new updates in this release, extending the functionality and capability of the API:

  • Moving from slim-based training to Estimator-based training.
  • Support for RetinaNet, and a MobileNet adaptation of RetinaNet.
  • A novel SSD-based architecture called the Pooling Pyramid Network (PPN).
  • Releasing several TPU-compatible models. These can be found in the samples/configs/ directory with a comment in the pipeline configuration files indicating TPU compatibility.
  • Support for quantized training.
  • Updated documentation for new binaries, Cloud training, and Tensorflow Lite.

See also our expanded announcement blogpost and accompanying tutorial at the TensorFlow blog.

Thanks to contributors: Sara Robinson, Aakanksha Chowdhery, Derek Chow, Pengchong Jin, Jonathan Huang, Vivek Rathod, Zhichao Lu, Ronny Votel

June 25, 2018

Additional evaluation tools for the Open Images Challenge 2018 are out. Check out our short tutorial on data preparation and running evaluation here!

Thanks to contributors: Alina Kuznetsova

June 5, 2018

We have released the implementation of evaluation metrics for both tracks of the Open Images Challenge 2018 as a part of the Object Detection API - see the evaluation protocols for more details. Additionally, we have released a tool for hierarchical labels expansion for the Open Images Challenge: check out oid_hierarchical_labels_expansion.py.

Thanks to contributors: Alina Kuznetsova, Vittorio Ferrari, Jasper Uijlings

April 30, 2018

We have released a Faster R-CNN detector with ResNet-101 feature extractor trained on AVA v2.1. Compared with other commonly used object detectors, it changes the action classification loss function to per-class Sigmoid loss to handle boxes with multiple labels. The model is trained on the training split of AVA v2.1 for 1.5M iterations, it achieves mean AP of 11.25% over 60 classes on the validation split of AVA v2.1. For more details please refer to this paper.

Thanks to contributors: Chen Sun, David Ross

April 2, 2018

Supercharge your mobile phones with the next generation mobile object detector! We are adding support for MobileNet V2 with SSDLite presented in MobileNetV2: Inverted Residuals and Linear Bottlenecks. This model is 35% faster than Mobilenet V1 SSD on a Google Pixel phone CPU (200ms vs. 270ms) at the same accuracy. Along with the model definition, we are also releasing a model checkpoint trained on the COCO dataset.

Thanks to contributors: Menglong Zhu, Mark Sandler, Zhichao Lu, Vivek Rathod, Jonathan Huang

February 9, 2018

We now support instance segmentation!! In this API update we support a number of instance segmentation models similar to those discussed in the Mask R-CNN paper. For further details refer to our slides from the 2017 Coco + Places Workshop. Refer to the section on Running an Instance Segmentation Model for instructions on how to configure a model that predicts masks in addition to object bounding boxes.

Thanks to contributors: Alireza Fathi, Zhichao Lu, Vivek Rathod, Ronny Votel, Jonathan Huang

November 17, 2017

As a part of the Open Images V3 release we have released:

  • An implementation of the Open Images evaluation metric and the protocol.
  • Additional tools to separate inference of detection and evaluation (see this tutorial).
  • A new detection model trained on the Open Images V2 data release (see Open Images model).

See more information on the Open Images website!

Thanks to contributors: Stefan Popov, Alina Kuznetsova

November 6, 2017

We have re-released faster versions of our (pre-trained) models in the model zoo. In addition to what was available before, we are also adding Faster R-CNN models trained on COCO with Inception V2 and Resnet-50 feature extractors, as well as a Faster R-CNN with Resnet-101 model trained on the KITTI dataset.

Thanks to contributors: Jonathan Huang, Vivek Rathod, Derek Chow, Tal Remez, Chen Sun.

October 31, 2017

We have released a new state-of-the-art model for object detection using the Faster-RCNN with the NASNet-A image featurization. This model achieves mAP of 43.1% on the test-dev validation dataset for COCO, improving on the best available model in the zoo by 6% in terms of absolute mAP.

Thanks to contributors: Barret Zoph, Vijay Vasudevan, Jonathon Shlens, Quoc Le

August 11, 2017

We have released an update to the Android Detect demo which will now run models trained using the Tensorflow Object Detection API on an Android device. By default, it currently runs a frozen SSD w/Mobilenet detector trained on COCO, but we encourage you to try out other detection models!

Thanks to contributors: Jonathan Huang, Andrew Harp

June 15, 2017

In addition to our base Tensorflow detection model definitions, this release includes:

  • A selection of trainable detection models, including:
    • Single Shot Multibox Detector (SSD) with MobileNet,
    • SSD with Inception V2,
    • Region-Based Fully Convolutional Networks (R-FCN) with Resnet 101,
    • Faster RCNN with Resnet 101,
    • Faster RCNN with Inception Resnet v2
  • Frozen weights (trained on the COCO dataset) for each of the above models to be used for out-of-the-box inference purposes.
  • A Jupyter notebook for performing out-of-the-box inference with one of our released models
  • Convenient local training scripts as well as distributed training and evaluation pipelines via Google Cloud.

Thanks to contributors: Jonathan Huang, Vivek Rathod, Derek Chow, Chen Sun, Menglong Zhu, Matthew Tang, Anoop Korattikara, Alireza Fathi, Ian Fischer, Zbigniew Wojna, Yang Song, Sergio Guadarrama, Jasper Uijlings, Viacheslav Kovalevskyi, Kevin Murphy

You can’t perform that action at this time.