- 12 May, 2020 1 commit
-
-
pkulzc authored
310447280 by lzc: Internal change 310420845 by Zhichao Lu: Open source the internal Context RCNN code. -- 310362339 by Zhichao Lu: Internal change 310259448 by lzc: Update required TF version for OD API. -- 310252159 by Zhichao Lu: Port patch_ops_test to TF1/TF2 as TPUs. -- 310247180 by Zhichao Lu: Ignore keypoint heatmap loss in the regions/bounding boxes with target keypoint class but no valid keypoint annotations. -- 310178294 by Zhichao Lu: Opensource MnasFPN https://arxiv.org/abs/1912.01106 -- 310094222 by lzc: Internal changes. -- 310085250 by lzc: Internal Change. -- 310016447 by huizhongc: Remove unrecognized classes from labeled_classes. -- 310009470 by rathodv: Mark batcher.py as TF1 only. -- 310001984 by rathodv: Update core/preprocessor.py to be compatible with TF1/TF2.. -- 309455035 by Zhichao Lu: Makes the freezable_batch_norm_test run w/ v2 behavior. The main change is in v2 updates will happen right away when running batchnorm in training mode. So, we need to restore the weights between batchnorm calls to make sure the numerical checks all start from the same place. -- 309425881 by Zhichao Lu: Make TF1/TF2 optimizer builder tests explicit. -- 309408646 by Zhichao Lu: Make dataset builder tests TF1 and TF2 compatible. -- 309246305 by Zhichao Lu: Added the functionality of combining the person keypoints and object detection annotations in the binary that converts the COCO raw data to TfRecord. -- 309125076 by Zhichao Lu: Convert target_assigner_utils to TF1/TF2. -- 308966359 by huizhongc: Support SSD training with partially labeled groundtruth. -- 308937159 by rathodv: Update core/target_assigner.py to be compatible with TF1/TF2. -- 308774302 by Zhichao Lu: Internal -- 308732860 by rathodv: Make core/prefetcher.py compatible with TF1 only. -- 308726984 by rathodv: Update core/multiclass_nms_test.py to be TF1/TF2 compatible. -- 308714718 by rathodv: Update core/region_similarity_calculator_test.py to be TF1/TF2 compatible. -- 308707960 by rathodv: Update core/minibatch_sampler_test.py to be TF1/TF2 compatible. -- 308700595 by rathodv: Update core/losses_test.py to be TF1/TF2 compatible and remove losses_test_v2.py -- 308361472 by rathodv: Update core/matcher_test.py to be TF1/TF2 compatible. -- 308335846 by Zhichao Lu: Updated the COCO evaluation logics and populated the groundturth area information through. This change matches the groundtruth format expected by the COCO keypoint evaluation. -- 308256924 by rathodv: Update core/keypoints_ops_test.py to be TF1/TF2 compatible. -- 308256826 by rathodv: Update class_agnostic_nms_test.py to be TF1/TF2 compatible. -- 308256112 by rathodv: Update box_list_ops_test.py to be TF1/TF2 compatible. -- 308159360 by Zhichao Lu: Internal change 308145008 by Zhichao Lu: Added 'image/class/confidence' field in the TFExample decoder. -- 307651875 by rathodv: Refactor core/box_list.py to support TF1/TF2. -- 307651798 by rathodv: Modify box_coder.py base class to work with with TF1/TF2 -- 307651652 by rathodv: Refactor core/balanced_positive_negative_sampler.py to support TF1/TF2. -- 307651571 by rathodv: Modify BoxCoders tests to use test_case:execute method to allow testing with TF1.X and TF2.X -- 307651480 by rathodv: Modify Matcher tests to use test_case:execute method to allow testing with TF1.X and TF2.X -- 307651409 by rathodv: Modify AnchorGenerator tests to use test_case:execute method to allow testing with TF1.X and TF2.X -- 307651314 by rathodv: Refactor model_builder to support TF1 or TF2 models based on TensorFlow version. -- 307092053 by Zhichao Lu: Use manager to save checkpoint. -- 307071352 by ronnyvotel: Fixing keypoint visibilities. Now by default, the visibility is marked True if the keypoint is labeled (regardless of whether it is visible or not). Also, if visibilities are not present in the dataset, they will be created based on whether the keypoint coordinates are finite (vis = True) or NaN (vis = False). -- 307069557 by Zhichao Lu: Internal change to add few fields related to postprocessing parameters in center_net.proto and populate those parameters to the keypoint postprocessing functions. -- 307012091 by Zhichao Lu: Make Adam Optimizer's epsilon proto configurable. Potential issue: tf.compat.v1's AdamOptimizer has a default epsilon on 1e-08 ([doc-link](https://www.tensorflow.org/api_docs/python/tf/compat/v1/train/AdamOptimizer)) whereas tf.keras's AdamOptimizer has default epsilon 1e-07 ([doc-link](https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/Adam)) -- 306858598 by Zhichao Lu: Internal changes to update the CenterNet model: 1) Modified eval job loss computation to avoid averaging over batches with zero loss. 2) Updated CenterNet keypoint heatmap target assigner to apply box size to heatmap Guassian standard deviation. 3) Updated the CenterNet meta arch keypoint losses computation to apply weights outside of loss function. -- 306731223 by jonathanhuang: Internal change. -- 306549183 by rathodv: Internal Update. -- 306542930 by rathodv: Internal Update -- 306322697 by rathodv: Internal. -- 305345036 by Zhichao Lu: Adding COCO Camera Traps Json to tf.Example beam code -- 304104869 by lzc: Internal changes. -- 304068971 by jonathanhuang: Internal change. -- 304050469 by Zhichao Lu: Internal change. -- 303880642 by huizhongc: Support parsing partially labeled groundtruth. -- 303841743 by Zhichao Lu: Deprecate nms_on_host in SSDMetaArch. -- 303803204 by rathodv: Internal change. -- 303793895 by jonathanhuang: Internal change. -- 303467631 by rathodv: Py3 update for detection inference test. -- 303444542 by rathodv: Py3 update to metrics module -- 303421960 by rathodv: Update json_utils to python3. -- 302787583 by ronnyvotel: Coco results generator for submission to the coco test server. -- 302719091 by Zhichao Lu: Internal change to add the ResNet50 image feature extractor for CenterNet model. -- 302116230 by Zhichao Lu: Added the functions to overlay the heatmaps with images in visualization util library. -- 301888316 by Zhichao Lu: Fix checkpoint_filepath not defined error. -- 301840312 by ronnyvotel: Adding keypoint_scores to visualizations. -- 301683475 by ronnyvotel: Introducing the ability to preprocess `keypoint_visibilities`. Some data augmentation ops such as random crop can filter instances and keypoints. It's important to also filter keypoint visibilities, so that the groundtruth tensors are always in alignment. -- 301532344 by Zhichao Lu: Don't use tf.divide since "Quantization not yet supported for op: DIV" -- 301480348 by ronnyvotel: Introducing keypoint evaluation into model lib v2. Also, making some fixes to coco keypoint evaluation. -- 301454018 by Zhichao Lu: Added the image summary to visualize the train/eval input images and eval's prediction/groundtruth side-by-side image. -- 301317527 by Zhichao Lu: Updated the random_absolute_pad_image function in the preprocessor library to support the keypoints argument. -- 301300324 by Zhichao Lu: Apply name change(experimental_run_v2 -> run) for all callers in Tensorflow. -- 301297115 by ronnyvotel: Utility function for setting keypoint visibilities based on keypoint coordinates. -- 301248885 by Zhichao Lu: Allow MultiworkerMirroredStrategy(MWMS) use by adding checkpoint handling with temporary directories in model_lib_v2. Added missing WeakKeyDictionary cfer_fn_cache field in CollectiveAllReduceStrategyExtended. -- 301224559 by Zhichao Lu: ...1) Fixes model_lib to also use keypoints while preparing model groundtruth. ...2) Tests model_lib with newly added keypoint metrics config. -- 300836556 by Zhichao Lu: Internal changes to add keypoint estimation parameters in CenterNet proto. -- 300795208 by Zhichao Lu: Updated the eval_util library to populate the keypoint groundtruth to eval_dict. -- 299474766 by Zhichao Lu: ...Modifies eval_util to create Keypoint Evaluator objects when configured in eval config. -- 299453920 by Zhichao Lu: Add swish activation as a hyperperams option. -- 299240093 by ronnyvotel: Keypoint postprocessing for CenterNetMetaArch. -- 299176395 by Zhichao Lu: Internal change. -- 299135608 by Zhichao Lu: Internal changes to refactor the CenterNet model in preparation for keypoint estimation tasks. -- 298915482 by Zhichao Lu: Make dataset_builder aware of input_context for distributed training. -- 298713595 by Zhichao Lu: Handling data with negative size boxes. -- 298695964 by Zhichao Lu: Expose change_coordinate_frame as a config parameter; fix multiclass_scores optional field. -- 298492150 by Zhichao Lu: Rename optimizer_builder_test_v2.py -> optimizer_builder_v2_test.py -- 298476471 by Zhichao Lu: Internal changes to support CenterNet keypoint estimation. -- 298365851 by ronnyvotel: Fixing a bug where groundtruth_keypoint_weights were being padded with a dynamic dimension. -- 297843700 by Zhichao Lu: Internal change. -- 297706988 by lzc: Internal change. -- 297705287 by ronnyvotel: Creating the "snapping" behavior in CenterNet, where regressed keypoints are refined with updated candidate keypoints from a heatmap. -- 297700447 by Zhichao Lu: Improve checkpoint checking logic with TF2 loop. -- 297686094 by Zhichao Lu: Convert "import tensorflow as tf" to "import tensorflow.compat.v1". -- 297670468 by lzc: Internal change. -- 297241327 by Zhichao Lu: Convert "import tensorflow as tf" to "import tensorflow.compat.v1". -- 297205959 by Zhichao Lu: Internal changes to support refactored the centernet object detection target assigner into a separate library. -- 297143806 by Zhichao Lu: Convert "import tensorflow as tf" to "import tensorflow.compat.v1". -- 297129625 by Zhichao Lu: Explicitly replace "import tensorflow" with "tensorflow.compat.v1" for TF2.x migration -- 297117070 by Zhichao Lu: Explicitly replace "import tensorflow" with "tensorflow.compat.v1" for TF2.x migration -- 297030190 by Zhichao Lu: Add configuration options for visualizing keypoint edges -- 296359649 by Zhichao Lu: Support DepthwiseConv2dNative (of separable conv) in weight equalization loss. -- 296290582 by Zhichao Lu: Internal change. -- 296093857 by Zhichao Lu: Internal changes to add general target assigner utilities. -- 295975116 by Zhichao Lu: Fix visualize_boxes_and_labels_on_image_array to show max_boxes_to_draw correctly. -- 295819711 by Zhichao Lu: Adds a flag to visualize_boxes_and_labels_on_image_array to skip the drawing of axis aligned bounding boxes. -- 295811929 by Zhichao Lu: Keypoint support in random_square_crop_by_scale. -- 295788458 by rathodv: Remove unused checkpoint to reduce repo size on github -- 295787184 by Zhichao Lu: Enable visualization of edges between keypoints -- 295763508 by Zhichao Lu: [Context RCNN] Add an option to enable / disable cropping feature in the post process step in the meta archtecture. -- 295605344 by Zhichao Lu: internal change. -- 294926050 by ronnyvotel: Adding per-keypoint groundtruth weights. These weights are intended to be used as multipliers in a keypoint loss function. Groundtruth keypoint weights are constructed as follows: - Initialize the weight for each keypoint type based on user-specified weights in the input_reader proto - Mask out (i.e. make zero) all keypoint weights that are not visible. -- 294829061 by lzc: Internal change. -- 294566503 by Zhichao Lu: Changed internal CenterNet Model configuration. -- 294346662 by ronnyvotel: Using NaN values in keypoint coordinates that are not visible. -- 294333339 by Zhichao Lu: Change experimetna_distribute_dataset -> experimental_distribute_dataset_from_function -- 293928752 by Zhichao Lu: Internal change -- 293909384 by Zhichao Lu: Add capabilities to train 1024x1024 CenterNet models. -- 293637554 by ronnyvotel: Adding keypoint visibilities to TfExampleDecoder. -- 293501558 by lzc: Internal change. -- 293252851 by Zhichao Lu: Change tf.gfile.GFile to tf.io.gfile.GFile. -- 292730217 by Zhichao Lu: Internal change. -- 292456563 by lzc: Internal changes. -- 292355612 by Zhichao Lu: Use tf.gather and tf.scatter_nd instead of matrix ops. -- 292245265 by rathodv: Internal -- 291989323 by richardmunoz: Refactor out building a DataDecoder from building a tf.data.Dataset. -- 291950147 by Zhichao Lu: Flip bounding boxes in arbitrary shaped tensors. -- 291401052 by huizhongc: Fix multiscale grid anchor generator to allow fully convolutional inference. When exporting model with identity_resizer as image_resizer, there is an incorrect box offset on the detection results. We add the anchor offset to address this problem. -- 291298871 by Zhichao Lu: Py3 compatibility changes. -- 290957957 by Zhichao Lu: Hourglass feature extractor for CenterNet. -- 290564372 by Zhichao Lu: Internal change. -- 290155278 by rathodv: Remove Dataset Explorer. -- 290155153 by Zhichao Lu: Internal change -- 290122054 by Zhichao Lu: Unify the format in the faster_rcnn.proto -- 290116084 by Zhichao Lu: Deprecate tensorflow.contrib. -- 290100672 by Zhichao Lu: Update MobilenetV3 SSD candidates -- 289926392 by Zhichao Lu: Internal change -- 289553440 by Zhichao Lu: [Object Detection API] Fix the comments about the dimension of the rpn_box_encodings from 4-D to 3-D. -- 288994128 by lzc: Internal changes. -- 288942194 by lzc: Internal change. -- 288746124 by Zhichao Lu: Configurable channel mean/std. dev in CenterNet feature extractors. -- 288552509 by rathodv: Internal. -- 288541285 by rathodv: Internal update. -- 288396396 by Zhichao Lu: Make object detection import contrib explicitly -- 288255791 by rathodv: Internal -- 288078600 by Zhichao Lu: Fix model_lib_v2 test -- 287952244 by rathodv: Internal -- 287921774 by Zhichao Lu: internal change -- 287906173 by Zhichao Lu: internal change -- 287889407 by jonathanhuang: PY3 compatibility -- 287889042 by rathodv: Internal -- 287876178 by Zhichao Lu: Internal change. -- 287770490 by Zhichao Lu: Add CenterNet proto and builder -- 287694213 by Zhichao Lu: Support for running multiple steps per tf.function call. -- 287377183 by jonathanhuang: PY3 compatibility -- 287371344 by rathodv: Support loading keypoint labels and ids. -- 287368213 by rathodv: Add protos supporting keypoint evaluation. -- 286673200 by rathodv: dataset_tools PY3 migration -- 286635106 by Zhichao Lu: Update code for upcoming tf.contrib removal -- 286479439 by Zhichao Lu: Internal change -- 286311711 by Zhichao Lu: Skeleton of context model within TFODAPI -- 286005546 by Zhichao Lu: Fix Faster-RCNN training when using keep_aspect_ratio_resizer with pad_to_max_dimension -- 285906400 by derekjchow: Internal change -- 285822795 by Zhichao Lu: Add CenterNet meta arch target assigners. -- 285447238 by Zhichao Lu: Internal changes. -- 285016927 by Zhichao Lu: Make _dummy_computation a tf.function. This fixes breakage caused by cl/284256438 -- 284827274 by Zhichao Lu: Convert to python 3. -- 284645593 by rathodv: Internal change -- 284639893 by rathodv: Add missing documentation for keypoints in eval_util.py. -- 284323712 by Zhichao Lu: Internal changes. -- 284295290 by Zhichao Lu: Updating input config proto and dataset builder to include context fields Updating standard_fields and tf_example_decoder to include context features -- 284226821 by derekjchow: Update exporter. -- 284211030 by Zhichao Lu: API changes in CenterNet informed by the experiments with hourlgass network. -- 284190451 by Zhichao Lu: Add support for CenterNet losses in protos and builders. -- 284093961 by lzc: Internal changes. -- 284028174 by Zhichao Lu: Internal change -- 284014719 by derekjchow: Do not pad top_down feature maps unnecessarily. -- 284005765 by Zhichao Lu: Add new pad_to_multiple_resizer -- 283858233 by Zhichao Lu: Make target assigner work when under tf.function. -- 283836611 by Zhichao Lu: Make config getters more general. -- 283808990 by Zhichao Lu: Internal change -- 283754588 by Zhichao Lu: Internal changes. -- 282460301 by Zhichao Lu: Add ability to restore v2 style checkpoints. -- 281605842 by lzc: Add option to disable loss computation in OD API eval job. -- 280298212 by Zhichao Lu: Add backwards compatible change -- 280237857 by Zhichao Lu: internal change -- PiperOrigin-RevId: 310447280
-
- 13 Nov, 2019 1 commit
-
-
Mark Sandler authored
280142968 by Zhichao Lu: Opensource MobilenetEdgeTPU + ssdlite into third-party object detection APIs on EdgeTPU. -- 280134001 by Zhichao Lu: Adds MobilenetEdgeTpu + ssdlite into internal object detection APIs on EdgeTPU. -- 278941778 by Zhichao Lu: Add support for fixed input shapes for 'encoded_image_string_tensor' and 'tf_example' inputs. -- 278933274 by Zhichao Lu: Adding fool proof check to avoid using 1x1 depthwise conv op. -- 278762192 by Zhichao Lu: Ensure correct number of iterations after training resumes. -- 278746440 by Zhichao Lu: Internal change. -- 278006953 by Zhichao Lu: Internal changes to tf.contrib symbols -- 278006330 by Zhichao Lu: Internal changes to tf.contrib symbols -- 277593959 by Zhichao Lu: Make the ssd_feature_extractor_test.py PY3 compatible. The "six.zip" will use "itertools.izip" in Python 2 and "zip" in Python 3. -- 277344551 by Zhichao Lu: Internal change. -- 277154953 by Zhichao Lu: Conditionally use keras based optimizers so that check-pointing works correctly. This change also enables summaries on TPU which were previously not enabled due to a bug. -- 277087572 by Zhichao Lu: Fix resizing boxes when using keep_aspect_ratio_rezier with padding. -- 275898543 by Zhichao Lu: Support label_map_proto as input in label_map_util. -- 275347137 by Zhichao Lu: Add force_no_resize flag in eval.proto which replaces the resize config with identity resizer. This is useful when we want to test at the original image resolution. -- PiperOrigin-RevId: 280142968
-
- 15 Jul, 2019 1 commit
-
-
pkulzc authored
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 fo...
-
- 31 May, 2019 1 commit
-
-
pkulzc authored
250447559 by Zhichao Lu: Update expected files format for Instance Segmentation challenge: - add fields ImageWidth, ImageHeight and store the values per prediction - as mask, store only encoded image and assume its size is ImageWidth x ImageHeight -- 250402780 by rathodv: Fix failing Mask R-CNN TPU convergence test. Cast second stage prediction tensors from bfloat16 to float32 to prevent errors in third target assignment (Mask Prediction) - Concat with different types bfloat16 and bfloat32 isn't allowed. -- 250300240 by Zhichao Lu: Addion Open Images Challenge 2019 object detection and instance segmentation support into Estimator framework. -- 249944839 by rathodv: Modify exporter.py to add multiclass score nodes in exported inference graphs. -- 249935201 by rathodv: Modify postprocess methods to preserve multiclass scores after non max suppression. -- 249878079 by Zhichao Lu: This CL slightly refactors some Object Detection helper functions for data creation, evaluation, and groundtruth providing. This will allow the eager+function custom loops to share code with the existing estimator training loops. Concretely we make the following changes: 1. In input creation we separate dataset-creation into top-level helpers, and allow it to optionally accept a pre-constructed model directly instead of always creating a model from the config just for feature preprocessing. 2. In coco evaluation we split the update_op creation into its own function, which the custom loops will call directly. 3. In model_lib we move groundtruth providing/ datastructure munging into a helper function 4. For now we put an escape hatch in `_summarize_target_assignment` when executing in tf v2.0 behavior because the summary apis used only work w/ tf 1.x -- 249673507 by rathodv: Use explicit casts instead of tf.to_float and tf.to_int32 to avoid warnings. -- 249656006 by Zhichao Lu: Add named "raw_keypoint_locations" node that corresponds with the "raw_box_locations" node. -- 249651674 by rathodv: Keep proposal boxes in float format. MatMulCropAndResize can handle the type even when feature themselves are bfloat16s. -- 249568633 by rathodv: Support q > 1 in class agnostic NMS. Break post_processing_test.py into 3 separate files to avoid linter errors. -- 249535530 by rathodv: Update some deprecated arguments to tf ops. -- 249368223 by rathodv: Modify MatMulCropAndResize to use MultiLevelRoIAlign method and move the tests to spatial_transform_ops.py module. This cl establishes that CropAndResize and RoIAlign are equivalent and only differ in the sampling point grid within the boxes. CropAndResize uses a uniform size x size point grid such that the corner points exactly overlap box corners, while RoiAlign divides boxes into size x size cells and uses their centers as sampling points. In this cl, we switch MatMulCropAndResize to use the MultiLevelRoIAlign implementation with `align_corner` option as MultiLevelRoIAlign implementation is more memory efficient on TPU when compared to the original MatMulCropAndResize. -- 249337338 by chowdhery: Add class-agnostic non-max-suppression in post_processing -- 249139196 by Zhichao Lu: Fix positional argument bug in export_tflite_ssd_graph -- 249120219 by Zhichao Lu: Add evaluator for computing precision limited to a given recall range. -- 249030593 by Zhichao Lu: Evaluation util to run segmentation and detection challenge evaluation. -- 248554358 by Zhichao Lu: This change contains the auxiliary changes required for TF 2.0 style training with eager+functions+dist strat loops, but not the loops themselves. It includes: - Updates to shape usage to support both tensorshape v1 and tensorshape v2 - A fix to FreezableBatchNorm to not override the `training` arg in call when `None` was passed to the constructor (Not an issue in the estimator loops but it was in the custom loops) - Puts some constants in init_scope so they work in eager + functions - Makes learning rate schedules return a callable in eager mode (required so they update when the global_step changes) - Makes DetectionModel a tf.module so it tracks variables (e.g. ones nested in layers) - Removes some references to `op.name` for some losses and replaces it w/ explicit names - A small part of the change to allow the coco evaluation metrics to work in eager mode -- 248271226 by rathodv: Add MultiLevel RoIAlign op. -- 248229103 by rathodv: Add functions to 1. pad features maps 2. ravel 5-D indices -- 248206769 by rathodv: Add utilities needed to introduce RoI Align op. -- 248177733 by pengchong: Internal changes -- 247742582 by Zhichao Lu: Open Images Challenge 2019 instance segmentation metric: part 2 -- 247525401 by Zhichao Lu: Update comments on max_class_per_detection. -- 247520753 by rathodv: Add multilevel crop and resize operation that builds on top of matmul_crop_and_resize. -- 247391600 by Zhichao Lu: Open Images Challenge 2019 instance segmentation metric -- 247325813 by chowdhery: Quantized MobileNet v2 SSD FPNLite config with depth multiplier 0.75 -- PiperOrigin-RevId: 250447559
-
- 30 Nov, 2018 1 commit
-
-
Zhichao Lu authored
223075771 by lzc: Bring in external fixes. -- 222919755 by ronnyvotel: Bug fix in faster r-cnn model builder. Was previously using `inplace_batchnorm_update` for `reuse_weights`. -- 222885680 by Zhichao Lu: Use the result_dict_for_batched_example in models_lib Also fixes the visualization size on when eval is on GPU -- 222883648 by Zhichao Lu: Fix _unmatched_class_label for the _add_background_class == False case in ssd_meta_arch.py. -- 222836663 by Zhichao Lu: Adding support for visualizing grayscale images. Without this change, the images are black-red instead of grayscale. -- 222501978 by Zhichao Lu: Fix a bug that caused convert_to_grayscale flag not to be respected. -- 222432846 by richardmunoz: Fix mapping of groundtruth_confidences from shape [num_boxes] to [num_boxes, num_classes] when the input contains the groundtruth_confidences field. -- 221725755 by richardmunoz: Internal change. -- 221458536 by Zhichao Lu: Fix saver defer build bug in object detection train codepath. -- 221391590 by Zhichao Lu: Add support for group normalization in the object detection API. Just adding MobileNet-v1 SSD currently. This may serve as a road map for other models that wish to support group normalization as an option. -- 221367993 by Zhichao Lu: Bug fixes (1) Make RandomPadImage work, (2) Fix keep_checkpoint_every_n_hours. -- 221266403 by rathodv: Use detection boxes as proposals to compute correct mask loss in eval jobs. -- 220845934 by lzc: Internal change. -- 220778850 by Zhichao Lu: Incorporating existing metrics into Estimator framework. Should restore: -oid_challenge_detection_metrics -pascal_voc_detection_metrics -weighted_pascal_voc_detection_metrics -pascal_voc_instance_segmentation_metrics -weighted_pascal_voc_instance_segmentation_metrics -oid_V2_detection_metrics -- 220370391 by alirezafathi: Adding precision and recall to the metrics. -- 220321268 by Zhichao Lu: Allow the option of setting max_examples_to_draw to zero. -- 220193337 by Zhichao Lu: This CL fixes a bug where the Keras convolutional box predictor was applying heads in the non-deterministic dict order. The consequence of this bug was that variables were created in non-deterministic orders. This in turn led different workers in a multi-gpu training setup to have slightly different graphs which had variables assigned to mismatched parameter servers. As a result, roughly half of all workers were unable to initialize and did no work, and training time was slowed down approximately 2x. -- 220136508 by huizhongc: Add weight equalization loss to SSD meta arch. -- 220125875 by pengchong: Rename label_scores to label_weights -- 219730108 by Zhichao Lu: Add description of detection_keypoints in postprocessed_tensors to docstring. -- 219577519 by pengchong: Support parsing the class confidences and training using them. -- 219547611 by lzc: Stop using static shapes in GPU eval jobs. -- 219536476 by Zhichao Lu: Migrate TensorFlow Lite out of tensorflow/contrib This change moves //tensorflow/contrib/lite to //tensorflow/lite in preparation for TensorFlow 2.0's deprecation of contrib/. If you refer to TF Lite build targets or headers, you will need to update them manually. If you use TF Lite from the TensorFlow python package, "tf.contrib.lite" now points to "tf.lite". Please update your imports as soon as possible. For more details, see https://groups.google.com/a/tensorflow.org/forum/#!topic/tflite/iIIXOTOFvwQ @angersson and @aselle are conducting this migration. Please contact them if you have any further questions. -- 219190083 by Zhichao Lu: Add a second expected_loss_weights function using an alternative expectation calculation compared to previous. Integrate this op into ssd_meta_arch and losses builder. Affects files that use losses_builder.build to handle the returning of an additional element. -- 218924451 by pengchong: Add a new way to assign training targets using groundtruth confidences. -- 218760524 by chowdhery: Modify export script to add option for regular NMS in TFLite post-processing op. -- PiperOrigin-RevId: 223075771
-
- 02 Nov, 2018 1 commit
-
-
pkulzc authored
* Internal change. PiperOrigin-RevId: 213914693 * Add original_image_spatial_shape tensor in input dictionary to store shape of the original input image PiperOrigin-RevId: 214018767 * Remove "groundtruth_confidences" from decoders use "groundtruth_weights" to indicate label confidence. This also solves a bug that only surfaced now - random crop routines in core/preprocessor.py did not correctly handle "groundtruth_weight" tensors returned by the decoders. PiperOrigin-RevId: 214091843 * Update CocoMaskEvaluator to allow for a batch of image info, rather than a single image. PiperOrigin-RevId: 214295305 * Adding the option to be able to summarize gradients. PiperOrigin-RevId: 214310875 * Adds FasterRCNN inference on CPU 1. Adds a flag use_static_shapes_for_eval to restrict to the ops that guarantees static shape. 2. No filtering of overlapping anchors while clipping the anchors when use_static_shapes_for_eval is set to True. 3. Adds test for faster_rcnn_meta_arch for predict and postprocess in inference mode for first and second stages. PiperOrigin-RevId: 214329565 * Fix model_lib eval_spec_names assignment (integer->string). PiperOrigin-RevId: 214335461 * Refactor Mask HEAD to optionally upsample after applying convolutions on ROI crops. PiperOrigin-RevId: 214338440 * Uses final_exporter_name as exporter_name for the first eval spec for backward compatibility. PiperOrigin-RevId: 214522032 * Add reshaped `mask_predictions` tensor to the prediction dictionary in `_predict_third_stage` method to allow computing mask loss in eval job. PiperOrigin-RevId: 214620716 * Add support for fully conv training to fpn. PiperOrigin-RevId: 214626274 * Fix the proprocess() function in Resnet v1 to make it work for any number of input channels. Note: If the #channels != 3, this will simply skip the mean subtraction in preprocess() function. PiperOrigin-RevId: 214635428 * Wrap result_dict_for_single_example in eval_util to run for batched examples. PiperOrigin-RevId: 214678514 * Adds PNASNet-based (ImageNet model) feature extractor for SSD. PiperOrigin-RevId: 214988331 * Update documentation PiperOrigin-RevId: 215243502 * Correct index used to compute number of groundtruth/detection boxes in COCOMaskEvaluator. Due to an incorrect indexing in cl/214295305 only the first detection mask and first groundtruth mask for a given image are fed to the COCO Mask evaluation library. Since groundtruth masks are arranged in no particular order, the first and highest scoring detection mask (detection masks are ordered by score) won't match the the first and only groundtruth retained in all cases. This is I think why mask evaluation metrics do not get better than ~11 mAP. Note that this code path is only active when using model_main.py binary for evaluation. This change fixes the indices and modifies an existing test case to cover it. PiperOrigin-RevId: 215275936 * Fixing grayscale_image_resizer to accept mask as input. PiperOrigin-RevId: 215345836 * Add an option not to clip groundtruth boxes during preprocessing. Clipping boxes adversely affects training for partially occluded or large objects, especially for fully conv models. Clipping already occurs during postprocessing, and should not occur during training. PiperOrigin-RevId: 215613379 * Always return recalls and precisions with length equal to the number of classes. The previous behavior of ObjectDetectionEvaluation was somewhat dangerous: when no groundtruth boxes were present, the lists of per-class precisions and recalls were simply truncated. Unless you were aware of this phenomenon (and consulted the `num_gt_instances_per_class` vector) it was difficult to associate each metric with each class. PiperOrigin-RevId: 215633711 * Expose the box feature node in SSD. PiperOrigin-RevId: 215653316 * Fix ssd mobilenet v2 _CONV_DEFS overwriting issue. PiperOrigin-RevId: 215654160 * More documentation updates PiperOrigin-RevId: 215656580 * Add pooling + residual option in multi_resolution_feature_maps. It adds an average pooling and a residual layer between feature maps with matching depth. Designed to be used with WeightSharedBoxPredictor. PiperOrigin-RevId: 215665619 * Only call create_modificed_mobilenet_config on init if use_depthwise is true. PiperOrigin-RevId: 215784290 * Only call create_modificed_mobilenet_config on init if use_depthwise is true. PiperOrigin-RevId: 215837524 * Don't prune keypoints if clip_boxes is false. PiperOrigin-RevId: 216187642 * Makes sure "key" field exists in the result dictionary. PiperOrigin-RevId: 216456543 * Add add_background_class parameter to allow disabling the inclusion of a background class. PiperOrigin-RevId: 216567612 * Update expected_classification_loss_under_sampling to better account for expected sampling. PiperOrigin-RevId: 216712287 * Let the evaluation receive a evaluation class in its constructor. PiperOrigin-RevId: 216769374 * This CL adds model building & training support for end-to-end Keras-based SSD models. If a Keras feature extractor's name is specified in the model config (e.g. 'ssd_mobilenet_v2_keras'), the model will use that feature extractor and a corresponding Keras-based box predictor. This CL makes sure regularization losses & batch norm updates work correctly when training models that have Keras-based components. It also updates the default hyperparameter settings of the keras-based mobilenetV2 (when not overriding hyperparams) to more closely match the legacy Slim training scope. PiperOrigin-RevId: 216938707 * Adding the ability in the coco evaluator to indicate whether an image has been annotated. For a non-annotated image, detections and groundtruth are not supplied. PiperOrigin-RevId: 217316342 * Release the 8k minival dataset ids for MSCOCO, used in Huang et al. "Speed/accuracy trade-offs for modern convolutional object detectors" (https://arxiv.org/abs/1611.10012) PiperOrigin-RevId: 217549353 * Exposes weighted_sigmoid_focal loss for faster rcnn classifier PiperOrigin-RevId: 217601740 * Add detection_features to output nodes. The shape of the feature is [batch_size, max_detections, depth]. PiperOrigin-RevId: 217629905 * FPN uses a custom NN resize op for TPU-compatibility. Replace this op with the Tensorflow version at export time for TFLite-compatibility. PiperOrigin-RevId: 217721184 * Compute `num_groundtruth_boxes` in inputs.tranform_input_data_fn after data augmentation instead of decoders. PiperOrigin-RevId: 217733432 * 1. Stop gradients from flowing into groundtruth masks with zero paddings. 2. Normalize pixelwise cross entropy loss across the whole batch. PiperOrigin-RevId: 217735114 * Optimize Input pipeline for Mask R-CNN on TPU with blfoat16: improve the step time from: 1663.6 ms -> 1184.2 ms, about 28.8% improvement. PiperOrigin-RevId: 217748833 * Fixes to export a TPU compatible model Adds nodes to each of the output tensor. Also increments the value of class labels by 1. PiperOrigin-RevId: 217856760 * API changes: - change the interface of target assigner to return per-class weights. - change the interface of classification loss to take per-class weights. PiperOrigin-RevId: 217968393 * Add an option to override pipeline config in export_saved_model using command line arg PiperOrigin-RevId: 218429292 * Include Quantized trained MobileNet V2 SSD and FaceSsd in model zoo. PiperOrigin-RevId: 218530947 * Write final config to disk in `train` mode only. PiperOrigin-RevId: 218735512
-
- 08 Aug, 2018 1 commit
-
-
pkulzc authored
* Merged commit includes the following changes: 207771702 by Zhichao Lu: Refactoring evaluation utilities so that it is easier to introduce new DetectionEvaluators with eval_metric_ops. -- 207758641 by Zhichao Lu: Require tensorflow version 1.9+ for running object detection API. -- 207641470 by Zhichao Lu: Clip `num_groundtruth_boxes` in pad_input_data_to_static_shapes() to `max_num_boxes`. This prevents a scenario where tensors are sliced to an invalid range in model_lib.unstack_batch(). -- 207621728 by Zhichao Lu: This CL adds a FreezableBatchNorm that inherits from the Keras BatchNormalization layer, but supports freezing the `training` parameter at construction time instead of having to do it in the `call` method. It also adds a method to the `KerasLayerHyperparams` class that will build an appropriate FreezableBatchNorm layer according to the hyperparameter configuration. If batch_norm is disabled, this method returns and Identity layer. These will be used to simplify the conversion to Keras APIs. -- 207610524 by Zhichao Lu: Update anchor generators and box predictors for python3 compatibility. -- 207585122 by Zhichao Lu: Refactoring convolutional box predictor into separate prediction heads. -- 207549305 by Zhichao Lu: Pass all 1s for batch weights if nothing is specified in GT. -- 207336575 by Zhichao Lu: Move the new argument 'target_assigner_instance' to the end of the list of arguments to the ssd_meta_arch constructor for backwards compatibility. -- 207327862 by Zhichao Lu: Enable support for float output in quantized custom op for postprocessing in SSD Mobilenet model. -- 207323154 by Zhichao Lu: Bug fix: change dict.iteritems() to dict.items() -- 207301109 by Zhichao Lu: Integrating expected_classification_loss_under_sampling op as an option in the ssd_meta_arch -- 207286221 by Zhichao Lu: Adding an option to weight regression loss with foreground scores from the ground truth labels. -- 207231739 by Zhichao Lu: Explicitly mentioning the argument names when calling the batch target assigner. -- 207206356 by Zhichao Lu: Add include_trainable_variables field to train config to better handle trainable variables. -- 207135930 by Zhichao Lu: Internal change. -- 206862541 by Zhichao Lu: Do not unpad the outputs from batch_non_max_suppression before sampling. Since BalancedPositiveNegativeSampler takes an indicator for valid positions to sample from we can pass the output from NMS directly into Sampler. -- PiperOrigin-RevId: 207771702 * Remove unused doc.
-
- 02 Jul, 2018 1 commit
-
-
pkulzc authored
* Merged commit includes the following changes: 202804536 by Zhichao Lu: Return tf.data.Dataset from input_fn that goes into the estimator and use PER_HOST_V2 option for tpu input pipeline config. This change shaves off 100ms per step resulting in 25 minutes of total reduced training time for ssd mobilenet v1 (15k steps to convergence). -- 202769340 by Zhichao Lu: Adding as_matrix() transformation for image-level labels. -- 202768721 by Zhichao Lu: Challenge evaluation protocol modification: adding labelmaps creation. -- 202750966 by Zhichao Lu: Add the explicit names to two output nodes. -- 202732783 by Zhichao Lu: Enforcing that batch size is 1 for evaluation, and no original images are retained during evaluation when use_tpu=False (to avoid dynamic shapes). -- 202425430 by Zhichao Lu: Refactor input pipeline to improve performance. -- 202406389 by Zhichao Lu: Only check the validity of `warmup_learning_rate` if it will be used. -- 202330450 by Zhichao Lu: Adding the description of the flag input_image_label_annotations_csv to add image-level labels to tf.Example. -- 202029012 by Zhichao Lu: Enabling displaying relationship name in the final metrics output. -- 202024010 by Zhichao Lu: Update to the public README. -- 201999677 by Zhichao Lu: Fixing the way negative labels are handled in VRD evaluation. -- 201962313 by Zhichao Lu: Fix a bug in resize_to_range. -- 201808488 by Zhichao Lu: Update ssd_inception_v2_pets.config to use right filename of pets dataset tf records. -- 201779225 by Zhichao Lu: Update object detection API installation doc -- 201766518 by Zhichao Lu: Add shell script to create pycocotools package for CMLE. -- 201722377 by Zhichao Lu: Removes verified_labels field and uses groundtruth_image_classes field instead. -- 201616819 by Zhichao Lu: Disable eval_on_tpu since eval_metrics is not setup to execute on TPU. Do not use run_config.task_type to switch tpu mode for EVAL, since that won't work in unit test. Expand unit test to verify that the same instantiation of the Estimator can independently disable eval on TPU whereas training is enabled on TPU. -- 201524716 by Zhichao Lu: Disable export model to TPU, inference is not compatible with TPU. Add GOOGLE_INTERNAL support in object detection copy.bara.sky -- 201453347 by Zhichao Lu: Fixing bug when evaluating the quantized model. -- 200795826 by Zhichao Lu: Fixing parsing bug: image-level labels are parsed as tuples instead of numpy array. -- 200746134 by Zhichao Lu: Adding image_class_text and image_class_label fields into tf_example_decoder.py -- 200743003 by Zhichao Lu: Changes to model_main.py and model_tpu_main to enable training and continuous eval. -- 200736324 by Zhichao Lu: Replace deprecated squeeze_dims argument. -- 200730072 by Zhichao Lu: Make detections only during predict and eval mode while creating model function -- 200729699 by Zhichao Lu: Minor correction to internal documentation (definition of Huber loss) -- 200727142 by Zhichao Lu: Add command line parsing as a set of flags using argparse and add header to the resulting file. -- 200726169 by Zhichao Lu: A tutorial on running evaluation for the Open Images Challenge 2018. -- 200665093 by Zhichao Lu: Cleanup on variables_helper_test.py. -- 200652145 by Zhichao Lu: Add an option to write (non-frozen) graph when exporting inference graph. -- 200573810 by Zhichao Lu: Update ssd_mobilenet_v1_coco and ssd_inception_v2_coco download links to point to a newer version. -- 200498014 by Zhichao Lu: Add test for groundtruth mask resizing. -- 200453245 by Zhichao Lu: Cleaning up exporting_models.md along with exporting scripts -- 200311747 by Zhichao Lu: Resize groundtruth mask to match the size of the original image. -- 200287269 by Zhichao Lu: Having a option to use custom MatMul based crop_and_resize op as an alternate to the TF op in Faster-RCNN -- 200127859 by Zhichao Lu: Updating the instructions to run locally with new binary. Also updating pets configs since file path naming has changed. -- 200127044 by Zhichao Lu: A simpler evaluation util to compute Open Images Challenge 2018 metric (object detection track). -- 200124019 by Zhichao Lu: Freshening up configuring_jobs.md -- 200086825 by Zhichao Lu: Make merge_multiple_label_boxes work for ssd model. -- 199843258 by Zhichao Lu: Allows inconsistent feature channels to be compatible with WeightSharedConvolutionalBoxPredictor. -- 199676082 by Zhichao Lu: Enable an override for `InputReader.shuffle` for object detection pipelines. -- 199599212 by Zhichao Lu: Markdown fixes. -- 199535432 by Zhichao Lu: Pass num_additional_channels to tf.example decoder in predict_input_fn. -- 199399439 by Zhichao Lu: Adding `num_additional_channels` field to specify how many additional channels to use in the model. -- PiperOrigin-RevId: 202804536 * Add original model builder and docs back.
-
- 22 Mar, 2018 1 commit
-
-
pkulzc authored
* Force cast of num_classes to integer PiperOrigin-RevId: 188335318 * Updating config util to allow overwriting of cosine decay learning rates. PiperOrigin-RevId: 188338852 * Make box_list_ops.py and box_list_ops_test.py work with C API enabled. The C API has improved shape inference over the original Python code. This causes some previously-working conds to fail. Switching to smart_cond fixes this. Another effect of the improved shape inference is that one of the failures tested gets caught earlier, so I modified the test to reflect this. PiperOrigin-RevId: 188409792 * Fix parallel event file writing issue. Without this change, the event files might get corrupted when multiple evaluations are run in parallel. PiperOrigin-RevId: 188502560 * Deprecating the boolean flag of from_detection_checkpoint. Replace with a string field fine_tune_checkpoint_type to train_config to provide extensibility. The fine_tune_checkpoint_type can currently take value of `detection`, `classification`, or others when the restore_map is overwritten. PiperOrigin-RevId: 188518685 * Automated g4 rollback of changelist 188502560 PiperOrigin-RevId: 188519969 * Introducing eval metrics specs for Coco Mask metrics. This allows metrics to be computed in tensorflow using the tf.learn Estimator. PiperOrigin-RevId: 188528485 * Minor fix to make object_detection/metrics/coco_evaluation.py python3 compatible. PiperOrigin-RevId: 188550683 * Updating eval_util to handle eval_metric_ops from multiple `DetectionEvaluator`s. PiperOrigin-RevId: 188560474 * Allow tensor input for new_height and new_width for resize_image. PiperOrigin-RevId: 188561908 * Fix typo in fine_tune_checkpoint_type name in trainer. PiperOrigin-RevId: 188799033 * Adding mobilenet feature extractor to object detection. PiperOrigin-RevId: 188916897 * Allow label maps to optionally contain an explicit background class with id zero. PiperOrigin-RevId: 188951089 * Fix boundary conditions in random_pad_to_aspect_ratio to ensure that min_scale is always less than max_scale. PiperOrigin-RevId: 189026868 * Fallback on from_detection_checkpoint option if fine_tune_checkpoint_type isn't set. PiperOrigin-RevId: 189052833 * Add proper names for learning rate schedules so we don't see cryptic names on tensorboard. PiperOrigin-RevId: 189069837 * Enforcing that all datasets are batched (and then unbatched in the model) with batch_size >= 1. PiperOrigin-RevId: 189117178 * Adding regularization to total loss returned from DetectionModel.loss(). PiperOrigin-RevId: 189189123 * Standardize the names of loss scalars (for SSD, Faster R-CNN and R-FCN) in both training and eval so they can be compared on tensorboard. Log localization and classification losses in evaluation. PiperOrigin-RevId: 189189940 * Remove negative test from box list ops test. PiperOrigin-RevId: 189229327 * Add an option to warmup learning rate in manual stepping schedule. PiperOrigin-RevId: 189361039 * Replace tf.contrib.slim.tfexample_decoder.LookupTensor with object_detection.data_decoders.tf_example_decoder.LookupTensor. PiperOrigin-RevId: 189388556 * Force regularization summary variables under specific family names. PiperOrigin-RevId: 189393190 * Automated g4 rollback of changelist 188619139 PiperOrigin-RevId: 189396001 * Remove step 0 schedule since we do a hard check for it after cl/189361039 PiperOrigin-RevId: 189396697 * PiperOrigin-RevId: 189040463 * PiperOrigin-RevId: 189059229 * PiperOrigin-RevId: 189214402 * Force regularization summary variables under specific family names. PiperOrigin-RevId: 189393190 * Automated g4 rollback of changelist 188619139 PiperOrigin-RevId: 189396001 * Make slim python3 compatible. * Monir fixes. * Add TargetAssignment summaries in a separate family. PiperOrigin-RevId: 189407487 * 1. Setting `family` keyword arg prepends the summary names twice with the same name. Directly adding family suffix to the name gets rid of this problem. 2. Make sure the eval losses have the same name. PiperOrigin-RevId: 189434618 * Minor fixes to make object detection tf 1.4 compatible. PiperOrigin-RevId: 189437519 * Call the base of mobilenet_v1 feature extractor under the right arg scope and set batchnorm is_training based on the value passed in the constructor. PiperOrigin-RevId: 189460890 * Automated g4 rollback of changelist 188409792 PiperOrigin-RevId: 189463882 * Update object detection syncing. PiperOrigin-RevId: 189601955 * Add an option to warmup learning rate, hold it constant for a certain number of steps and cosine decay it. PiperOrigin-RevId: 189606169 * Let the proposal feature extractor function in faster_rcnn meta architectures return the activations (end_points). PiperOrigin-RevId: 189619301 * Fixed bug which caused masks to be mostly zeros (caused by detection_boxes being in absolute coordinates if scale_to_absolute=True. PiperOrigin-RevId: 189641294 * Open sourcing Mobilenetv2 + SSDLite. PiperOrigin-RevId: 189654520 * Remove unused files.
-