Python metrics.add_image_pred_metrics() Examples
The following are 7
code examples of metrics.add_image_pred_metrics().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
metrics
, or try the search function
.
Example #1
Source File: model_rotator.py From yolo_v2 with Apache License 2.0 | 5 votes |
def get_metrics(inputs, outputs, params): """Aggregate the metrics for rotator model. Args: inputs: Input dictionary of the rotator model. outputs: Output dictionary returned by the rotator model. params: Hyperparameters of the rotator model. Returns: names_to_values: metrics->values (dict). names_to_updates: metrics->ops (dict). """ names_to_values = dict() names_to_updates = dict() tmp_values, tmp_updates = metrics.add_image_pred_metrics( inputs, outputs, params.num_views, 3*params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) tmp_values, tmp_updates = metrics.add_mask_pred_metrics( inputs, outputs, params.num_views, params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) for name, value in names_to_values.iteritems(): slim.summaries.add_scalar_summary( value, name, prefix='eval', print_summary=True) return names_to_values, names_to_updates
Example #2
Source File: model_rotator.py From Gun-Detector with Apache License 2.0 | 5 votes |
def get_metrics(inputs, outputs, params): """Aggregate the metrics for rotator model. Args: inputs: Input dictionary of the rotator model. outputs: Output dictionary returned by the rotator model. params: Hyperparameters of the rotator model. Returns: names_to_values: metrics->values (dict). names_to_updates: metrics->ops (dict). """ names_to_values = dict() names_to_updates = dict() tmp_values, tmp_updates = metrics.add_image_pred_metrics( inputs, outputs, params.num_views, 3*params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) tmp_values, tmp_updates = metrics.add_mask_pred_metrics( inputs, outputs, params.num_views, params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) for name, value in names_to_values.iteritems(): slim.summaries.add_scalar_summary( value, name, prefix='eval', print_summary=True) return names_to_values, names_to_updates
Example #3
Source File: model_rotator.py From object_detection_kitti with Apache License 2.0 | 5 votes |
def get_metrics(inputs, outputs, params): """Aggregate the metrics for rotator model. Args: inputs: Input dictionary of the rotator model. outputs: Output dictionary returned by the rotator model. params: Hyperparameters of the rotator model. Returns: names_to_values: metrics->values (dict). names_to_updates: metrics->ops (dict). """ names_to_values = dict() names_to_updates = dict() tmp_values, tmp_updates = metrics.add_image_pred_metrics( inputs, outputs, params.num_views, 3*params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) tmp_values, tmp_updates = metrics.add_mask_pred_metrics( inputs, outputs, params.num_views, params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) for name, value in names_to_values.iteritems(): slim.summaries.add_scalar_summary( value, name, prefix='eval', print_summary=True) return names_to_values, names_to_updates
Example #4
Source File: model_rotator.py From object_detection_with_tensorflow with MIT License | 5 votes |
def get_metrics(inputs, outputs, params): """Aggregate the metrics for rotator model. Args: inputs: Input dictionary of the rotator model. outputs: Output dictionary returned by the rotator model. params: Hyperparameters of the rotator model. Returns: names_to_values: metrics->values (dict). names_to_updates: metrics->ops (dict). """ names_to_values = dict() names_to_updates = dict() tmp_values, tmp_updates = metrics.add_image_pred_metrics( inputs, outputs, params.num_views, 3*params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) tmp_values, tmp_updates = metrics.add_mask_pred_metrics( inputs, outputs, params.num_views, params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) for name, value in names_to_values.iteritems(): slim.summaries.add_scalar_summary( value, name, prefix='eval', print_summary=True) return names_to_values, names_to_updates
Example #5
Source File: model_rotator.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def get_metrics(inputs, outputs, params): """Aggregate the metrics for rotator model. Args: inputs: Input dictionary of the rotator model. outputs: Output dictionary returned by the rotator model. params: Hyperparameters of the rotator model. Returns: names_to_values: metrics->values (dict). names_to_updates: metrics->ops (dict). """ names_to_values = dict() names_to_updates = dict() tmp_values, tmp_updates = metrics.add_image_pred_metrics( inputs, outputs, params.num_views, 3*params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) tmp_values, tmp_updates = metrics.add_mask_pred_metrics( inputs, outputs, params.num_views, params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) for name, value in names_to_values.iteritems(): slim.summaries.add_scalar_summary( value, name, prefix='eval', print_summary=True) return names_to_values, names_to_updates
Example #6
Source File: model_rotator.py From models with Apache License 2.0 | 5 votes |
def get_metrics(inputs, outputs, params): """Aggregate the metrics for rotator model. Args: inputs: Input dictionary of the rotator model. outputs: Output dictionary returned by the rotator model. params: Hyperparameters of the rotator model. Returns: names_to_values: metrics->values (dict). names_to_updates: metrics->ops (dict). """ names_to_values = dict() names_to_updates = dict() tmp_values, tmp_updates = metrics.add_image_pred_metrics( inputs, outputs, params.num_views, 3*params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) tmp_values, tmp_updates = metrics.add_mask_pred_metrics( inputs, outputs, params.num_views, params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) for name, value in names_to_values.iteritems(): slim.summaries.add_scalar_summary( value, name, prefix='eval', print_summary=True) return names_to_values, names_to_updates
Example #7
Source File: model_rotator.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def get_metrics(inputs, outputs, params): """Aggregate the metrics for rotator model. Args: inputs: Input dictionary of the rotator model. outputs: Output dictionary returned by the rotator model. params: Hyperparameters of the rotator model. Returns: names_to_values: metrics->values (dict). names_to_updates: metrics->ops (dict). """ names_to_values = dict() names_to_updates = dict() tmp_values, tmp_updates = metrics.add_image_pred_metrics( inputs, outputs, params.num_views, 3*params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) tmp_values, tmp_updates = metrics.add_mask_pred_metrics( inputs, outputs, params.num_views, params.image_size**2) names_to_values.update(tmp_values) names_to_updates.update(tmp_updates) for name, value in names_to_values.iteritems(): slim.summaries.add_scalar_summary( value, name, prefix='eval', print_summary=True) return names_to_values, names_to_updates