MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / _try_parse_filename_list

Method _try_parse_filename_list

tools/data/simple_dataset.py:94–102  ·  view source on GitHub ↗
(self, file_name)

Source from the content-addressed store, hash-verified

92 return
93
94 def _try_parse_filename_list(self, file_name):
95 # multiple images -> one gt label
96 if len(file_name) > 0 and file_name[0] == '[':
97 try:
98 info = json.loads(file_name)
99 file_name = random.choice(info)
100 except:
101 pass
102 return file_name
103
104 def get_ext_data(self):
105 ext_data_num = 0

Callers 3

get_ext_dataMethod · 0.95
__getitem__Method · 0.95
__getitem__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected