add back scale
MODIFY
README.md
README.md
@@ -95,7 +95,7 @@ Despite being tiny, tinygrad supports the full EfficientNet. Pass in a picture t
python3 examples/efficientnet.py https://upload.wikimedia.org/wikipedia/commons/4/41/Chicken.jpg
```
-Or, if you have a webcam and pygame+cv2 installed
+Or, if you have a webcam and cv2 installed
```bash
python3 examples/efficientnet.py webcam

MODIFY
examples/efficientnet.py
examples/efficientnet.py
@@ -180,7 +180,9 @@ if __name__ == "__main__":
img = Image.fromarray(frame[:, :, [2,1,0]])
out, retimg = infer(model, img)
print(np.argmax(out.data), np.max(out.data), lbls[np.argmax(out.data)])
- retimg = cv2.cvtColor(retimg, cv2.COLOR_RGB2BGR)
+ SCALE = 3
+ simg = cv2.resize(retimg, (224*SCALE, 224*SCALE))
+ retimg = cv2.cvtColor(simg, cv2.COLOR_RGB2BGR)
cv2.imshow('capture', retimg)
if cv2.waitKey(1) & 0xFF == ord('q'):
break

add back scale