16 lines
266 B
Python
16 lines
266 B
Python
|
|
from m import *
|
||
|
|
from PIL import Image
|
||
|
|
from sys import argv, exit
|
||
|
|
import numpy as np
|
||
|
|
|
||
|
|
|
||
|
|
if len(argv) != 2:
|
||
|
|
exit(1)
|
||
|
|
|
||
|
|
i = np.array(Image.open(argv[1]).convert('RGB').resize((300,300)))
|
||
|
|
|
||
|
|
mod.load_weights("model3.model.keras")
|
||
|
|
|
||
|
|
r = mod.predict(np.array([i]))
|
||
|
|
print(r)
|