MCPcopy Create free account
hub / github.com/apache/singa / preprocess

Function preprocess

examples/onnx/fer_emotion.py:33–38  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

31
32
33def preprocess(img):
34 input_shape = (1, 1, 64, 64)
35 img = img.resize((64, 64), Image.ANTIALIAS)
36 img_data = np.array(img).astype(np.float32)
37 img_data = np.resize(img_data, input_shape)
38 return img_data
39
40
41def get_image_labe():

Callers 1

fer_emotion.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected