Sriram Elango
Update
17f6735
raw
history blame contribute delete
444 Bytes
import easyocr
reader = easyocr.Reader(['en'])
def classifyCNNImage(image):
classes = ["confederate", "swastika", "gun", "kkk", "noose"]
textExtract = reader.readtext(image, detail = 0)
fullText = ""
for i in range(len(textExtract)):
fullText += textExtract[i]
fullText = fullText.lower()
for j in range(len(classes)):
if classes[j] in fullText:
return True
return False