text: # -*- coding: utf-8 -*-
  """
  Created on Wed Feb 10 14:53:23 2021
  
  @author: Sankeerth
  """
  # import the necessary packages
  from tensorflow.keras.models import load_model
  from skimage import transform
  from skimage import exposure
  from skimage import io
  from imutils import paths
  import numpy as np
  import argparse
  import imutils
  import random
  import cv2
  import os
  from PIL import Image
  
  
  labelNames = { 1:'Speed limit (20km/h)',
              2:'Speed limit (30km/h)', 
              3:'Speed limit (50km/h)', 
              4:'Speed limit (60km/h)', 
              5:'Speed limit (70km/h)', 
              6:'Speed limit (80km/h)', 
              7:'End of speed limit (80km/h)', 
              8:'Speed limit (100km/h)', 
              9:'Speed limit (120km/h)', 
              10:'No passing', 
              11:'No passing veh over 3.5 tons', 
              12:'Right-of-way at intersection', 
              13:'Priority road', 
              14:'Yield', 
              15:'Stop', 
              16:'No vehicles', 
              17:'Veh > 3.5 tons prohibited', 
              18:'No entry', 
              19:'General caution', 
              20:'Dangerous curve left', 
              21:'Dangerous curve right', 
              22:'Double curve', 
              23:'Bumpy road', 
              24:'Slippery road', 
              25:'Road narrows on the right', 
              26:'Road work', 
              27:'Traffic signals', 
              28:'Pedestrians', 
              29:'Children crossing', 
              30:'Bicycles crossing', 
              31:'Beware of ice/snow',
              32:'Wild animals crossing', 
              33:'End speed + passing limits', 
              34:'Turn right ahead',
              35:'Turn left ahead', 
              36:'Ahead only', 
              37:'Go straight or right', 
              38:'Go straight or left', 
              39:'Keep right', 
              40:'Keep left', 
              41:'Roundabout mandatory', 
              42:'End of no passing', 
              43:'End no passing veh > 3.5 tons' }
  
  
  imagePath = "E:\\trafficsigns_dataset\\extratest\\00070.png"
  model = load_model("E:\\trafficsigns_dataset\\my_model.h5")
  
      
  data=[]
  image = Image.open(imagePath)
  image = image.resize((30,30))
  data.append(np.array(image))
  
  X_test=np.array(data)    
  preds = model.predict(X_test)
  j = preds.argmax(axis=1)[0]
  label = labelNames[j+1]
  image = cv2.imread(imagePath)
  image = imutils.resize(image, width=128)
  cv2.putText(image, label, (5, 15), cv2.FONT_HERSHEY_SIMPLEX,
  		0.45, (0, 0, 255), 2)
  p = os.path.join("E:\\trafficsigns_dataset\\extratest\\",'detected'+'.png')
  cv2.imwrite(p, image)