File size: 676 Bytes
237424f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#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)