Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_track_index", REGION_TRACK_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_track_confidence", REGION_TRACK_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymin", REGION_BBOX_YMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_xmin", REGION_BBOX_XMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymax", REGION_BBOX_YMAX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_xmax", REGION_BBOX_XMAX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_x", REGION_POINT_X_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_y", REGION_POINT_Y_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_context_feature(name + "_parts",
REGION_PARTS_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_context_feature(
name + "_embedding_dimensions_per_region",
REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_context_feature(name + "_embedding_format",
REGION_EMBEDDING_FORMAT_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_embedding_floats",
REGION_EMBEDDING_FLOAT_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_label_string", REGION_LABEL_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_label_index", REGION_LABEL_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_label_confidence", REGION_LABEL_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_class_string", REGION_CLASS_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_class_index", REGION_CLASS_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_class_confidence", REGION_CLASS_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_track_string", REGION_TRACK_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_track_index", REGION_TRACK_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_track_confidence", REGION_TRACK_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymin", REGION_BBOX_YMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_xmin", REGION_BBOX_XMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymax", REGION_BBOX_YMAX_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_is_generated", REGION_IS_GENERATED_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_feature_list(name + "_timestamp", REGION_TIMESTAMP_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_feature_list(
name + "_unmodified_timestamp", REGION_UNMODIFIED_TIMESTAMP_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_label_string", REGION_LABEL_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_label_index", REGION_LABEL_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_label_confidence", REGION_LABEL_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_class_string", REGION_CLASS_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_class_index", REGION_CLASS_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_class_confidence", REGION_CLASS_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_track_string", REGION_TRACK_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_track_index", REGION_TRACK_INDEX_KEY,
REGION_PARTS_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_context_feature(
name + "_embedding_dimensions_per_region",
REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_context_feature(name + "_embedding_format",
REGION_EMBEDDING_FORMAT_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_embedding_floats",
REGION_EMBEDDING_FLOAT_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(name + "_embedding_encoded",
REGION_EMBEDDING_ENCODED_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_embedding_confidence",
REGION_EMBEDDING_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
# pylint: disable=undefined-variable
def get_prefixed_bbox_at(index, sequence_example, prefix):
return np.stack((
get_bbox_ymin_at(index, sequence_example, prefix=prefix),
get_bbox_xmin_at(index, sequence_example, prefix=prefix),
get_bbox_ymax_at(index, sequence_example, prefix=prefix),
get_bbox_xmax_at(index, sequence_example, prefix=prefix)),
1)
def add_prefixed_bbox(values, sequence_example, prefix):
add_bbox_ymin(values[:, 0], sequence_example, prefix=prefix)
add_bbox_xmin(values[:, 1], sequence_example, prefix=prefix)
add_bbox_ymax(values[:, 2], sequence_example, prefix=prefix)
add_bbox_xmax(values[:, 3], sequence_example, prefix=prefix)
def get_prefixed_bbox_size(sequence_example, prefix):
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_x", REGION_POINT_X_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_y", REGION_POINT_Y_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_context_feature(name + "_parts",
REGION_PARTS_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_context_feature(
name + "_embedding_dimensions_per_region",
REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_context_feature(name + "_embedding_format",
REGION_EMBEDDING_FORMAT_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_embedding_floats",
REGION_EMBEDDING_FLOAT_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(name + "_embedding_encoded",
REGION_EMBEDDING_ENCODED_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_embedding_confidence",
REGION_EMBEDDING_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
# pylint: disable=undefined-variable
def get_prefixed_bbox_at(index, sequence_example, prefix):
return np.stack((
get_bbox_ymin_at(index, sequence_example, prefix=prefix),
get_bbox_xmin_at(index, sequence_example, prefix=prefix),
get_bbox_ymax_at(index, sequence_example, prefix=prefix),
get_bbox_xmax_at(index, sequence_example, prefix=prefix)),
1)
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_class_confidence", REGION_CLASS_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_track_string", REGION_TRACK_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_track_index", REGION_TRACK_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_track_confidence", REGION_TRACK_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymin", REGION_BBOX_YMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_xmin", REGION_BBOX_XMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymax", REGION_BBOX_YMAX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_xmax", REGION_BBOX_XMAX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_x", REGION_POINT_X_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_y", REGION_POINT_Y_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_context_feature(name + "_parts",
REGION_PARTS_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_context_feature(
name + "_embedding_dimensions_per_region",
REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_class_index", REGION_CLASS_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_class_confidence", REGION_CLASS_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_feature_list(
name + "_track_string", REGION_TRACK_STRING_KEY,
prefix=prefix, module_dict=globals())
msu.create_int_list_feature_list(
name + "_track_index", REGION_TRACK_INDEX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(
name + "_track_confidence", REGION_TRACK_CONFIDENCE_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymin", REGION_BBOX_YMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_xmin", REGION_BBOX_XMIN_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_ymax", REGION_BBOX_YMAX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_xmax", REGION_BBOX_XMAX_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_x", REGION_POINT_X_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_y", REGION_POINT_Y_KEY,
prefix=prefix, module_dict=globals())
msu.create_bytes_list_context_feature(name + "_parts",
REGION_PARTS_KEY,
prefix=prefix, module_dict=globals())
msu.create_float_list_context_feature(
name + "_embedding_dimensions_per_region",