Closed KhomZ closed 2 years ago
from keras.models import model_from_json
json_file = open('MobileNets_character_recognition.json', 'r') loaded_model_json = json_file.read() json_file.close() model = model_from_json(loaded_model_json) model.load_weights("../Automatic-License-Plate-Detection-khom/character_recognition/License_character_recognition.h5") print("[INFO] Model loaded successfully...")
labels = LabelEncoder() labels.classes_ = np.load('../Automatic-License-Plate-Detection-khom/character_recognition/license_character_classes.npy') print("[INFO] Labels loaded successfully...")
NameError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_13688/1705145501.py in
3 loaded_model_json = json_file.read()
4 json_file.close()
----> 5 model = model_from_json(loaded_model_json)
6 model.load_weights("License_character_recognition_weight.h5")
7 print("[INFO] Model loaded successfully...")
NameError: name 'model_from_json' is not defined