mirror of
https://github.com/kritiksoman/GIMP-ML
synced 2024-10-31 09:20:18 +00:00
10 lines
282 B
Python
10 lines
282 B
Python
import cv2
|
|
from predictorClass import Predictor
|
|
|
|
predictor = Predictor(weights_path='best_fpn.h5')
|
|
img = cv2.imread('img/img.jpg')
|
|
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
|
pred = predictor(img, None)
|
|
pred = cv2.cvtColor(pred, cv2.COLOR_RGB2BGR)
|
|
cv2.imwrite('submit/img.jpg',pred)
|