File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
official/vision/beta/dataloaders Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ def __init__(self,
38
38
self ._regenerate_source_id = regenerate_source_id
39
39
self ._keys_to_features = {
40
40
'image/encoded' : tf .io .FixedLenFeature ((), tf .string ),
41
- 'image/source_id' : tf .io .FixedLenFeature ((), tf .string ),
42
41
'image/height' : tf .io .FixedLenFeature ((), tf .int64 ),
43
42
'image/width' : tf .io .FixedLenFeature ((), tf .int64 ),
44
43
'image/object/bbox/xmin' : tf .io .VarLenFeature (tf .float32 ),
@@ -54,6 +53,10 @@ def __init__(self,
54
53
self ._keys_to_features .update ({
55
54
'image/object/mask' : tf .io .VarLenFeature (tf .string ),
56
55
})
56
+ if not regenerate_source_id :
57
+ self ._keys_to_features .update ({
58
+ 'image/source_id' : tf .io .FixedLenFeature ((), tf .string ),
59
+ })
57
60
58
61
def _decode_image (self , parsed_tensors ):
59
62
"""Decodes the image and set its static shape."""
You can’t perform that action at this time.
0 commit comments