Created
July 29, 2020 05:39
-
-
Save Praveen76/7f2c5ac99b5cab02ea38f61254badaba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from glob import glob | |
model_paths = glob('snapshots/resnet50_csv_0*.h5') | |
latest_path = sorted(model_paths)[-1] | |
print("path:", latest_path) | |
from keras_retinanet import models | |
model = models.load_model(latest_path, backbone_name='resnet50') | |
model = models.convert_model(model) | |
label_map = {} | |
for line in open('../maskDetectorClasses.csv'): | |
row = line.rstrip().split(',') | |
label_map[int(row[1])] = row[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment