PlateNumberRecognition / transfer.py
jsjuan's picture
Upload transfer.py
237424f
raw history blame
No virus
676 Bytes
#import cv2
import numpy as np
# import matplotlib.pyplot as plt
#from local_utils import detect_lp
from os.path import splitext,basename
from keras.models import model_from_json
# import glob
def load_model(path):
try:
path = splitext(path)[0]
with open('%s.json' % path, 'r') as json_file:
model_json = json_file.read()
model = model_from_json(model_json, custom_objects={})
model.load_weights('%s.h5' % path)
#print("Loading model successfully...")
return model
except Exception as e:
print(e)
# wpod_net_path = "wpod-net.json"
# wpod_net = load_model(wpod_net_path)