MCPcopy
hub / github.com/matthewearl/deep-anpr / read_data

Function read_data

train.py:63–68  ·  view source on GitHub ↗
(img_glob)

Source from the content-addressed store, hash-verified

61
62
63def read_data(img_glob):
64 for fname in sorted(glob.glob(img_glob)):
65 im = cv2.imread(fname)[:, :, 0].astype(numpy.float32) / 255.
66 code = fname.split("/")[1][9:16]
67 p = fname.split("/")[1][17] == '1'
68 yield im, code_to_vec(p, code)
69
70
71def unzip(b):

Callers 1

trainFunction · 0.85

Calls 1

code_to_vecFunction · 0.85

Tested by

no test coverage detected