Commit 303ba2e5 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

adding argument `value_type` = 'float_list' forces it to convert any `int`...

adding argument `value_type` = 'float_list' forces it to convert any `int` values to float. Tensorflow ops requires this argument to be a float whereas some annotations tools are wrongly mentioning `area` as `int64` dtype.

PiperOrigin-RevId: 475385551
parent 87feb593
......@@ -226,7 +226,7 @@ def bbox_annotations_to_feature_dict(
'image/object/is_crowd':
tfrecord_lib.convert_to_feature(data['is_crowd']),
'image/object/area':
tfrecord_lib.convert_to_feature(data['area']),
tfrecord_lib.convert_to_feature(data['area'], 'float_list')
}
if include_masks:
feature_dict['image/object/mask'] = (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment