from imageai.Prediction import ImagePrediction
import os
import threading

execution_path = os.getcwd()
prediction.setModelTypeAsDenseNet()
prediction.setModelPath(os.path.join(execution_path, "C:\\Users\aditys\Documents\Image Manipulation"))

picturesfolder = os.environ["aditys"] + "\\Pictures\\"
allfiles = os.listdir(picturesfolder)

class PredictionThread(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
    def run(self):
        prediction.loadModel()
        for eachPicture in allfiles:
            if eachPicture.endswith(".png") or eachPicture.endswith(".jpg"):
                predictions, percentage_probabilities = prediction.predictImage(picturesfolder + eachPicture, result_count=1)
                for prediction, percentage_probability in zip(predictions, probabilities):
                    print(prediction , " : " , percentage_probability)

predictionThread = PredictionThread ()
predictionThread.start()
c0d74c02c793002e12ac8e8a0699a114d21a1c37
<mask token>


class PredictionThread(threading.Thread):

    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        prediction.loadModel()
        for eachPicture in allfiles:
            if eachPicture.endswith('.png') or eachPicture.endswith('.jpg'):
                predictions, percentage_probabilities = (prediction.
                    predictImage(picturesfolder + eachPicture, result_count=1))
                for prediction, percentage_probability in zip(predictions,
                    probabilities):
                    print(prediction, ' : ', percentage_probability)


<mask token>

<mask token>
prediction.setModelTypeAsDenseNet()
prediction.setModelPath(os.path.join(execution_path,
    'C:\\Users\x07ditys\\Documents\\Image Manipulation'))
<mask token>


class PredictionThread(threading.Thread):

    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        prediction.loadModel()
        for eachPicture in allfiles:
            if eachPicture.endswith('.png') or eachPicture.endswith('.jpg'):
                predictions, percentage_probabilities = (prediction.
                    predictImage(picturesfolder + eachPicture, result_count=1))
                for prediction, percentage_probability in zip(predictions,
                    probabilities):
                    print(prediction, ' : ', percentage_probability)


<mask token>
predictionThread.start()

<mask token>
execution_path = os.getcwd()
prediction.setModelTypeAsDenseNet()
prediction.setModelPath(os.path.join(execution_path,
    'C:\\Users\x07ditys\\Documents\\Image Manipulation'))
picturesfolder = os.environ['aditys'] + '\\Pictures\\'
allfiles = os.listdir(picturesfolder)


class PredictionThread(threading.Thread):

    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        prediction.loadModel()
        for eachPicture in allfiles:
            if eachPicture.endswith('.png') or eachPicture.endswith('.jpg'):
                predictions, percentage_probabilities = (prediction.
                    predictImage(picturesfolder + eachPicture, result_count=1))
                for prediction, percentage_probability in zip(predictions,
                    probabilities):
                    print(prediction, ' : ', percentage_probability)


predictionThread = PredictionThread()
predictionThread.start()

from imageai.Prediction import ImagePrediction
import os
import threading
execution_path = os.getcwd()
prediction.setModelTypeAsDenseNet()
prediction.setModelPath(os.path.join(execution_path,
    'C:\\Users\x07ditys\\Documents\\Image Manipulation'))
picturesfolder = os.environ['aditys'] + '\\Pictures\\'
allfiles = os.listdir(picturesfolder)


class PredictionThread(threading.Thread):

    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        prediction.loadModel()
        for eachPicture in allfiles:
            if eachPicture.endswith('.png') or eachPicture.endswith('.jpg'):
                predictions, percentage_probabilities = (prediction.
                    predictImage(picturesfolder + eachPicture, result_count=1))
                for prediction, percentage_probability in zip(predictions,
                    probabilities):
                    print(prediction, ' : ', percentage_probability)


predictionThread = PredictionThread()
predictionThread.start()

from imageai.Prediction import ImagePrediction
import os
import threading

execution_path = os.getcwd()
prediction.setModelTypeAsDenseNet()
prediction.setModelPath(os.path.join(execution_path, "C:\\Users\aditys\Documents\Image Manipulation"))

picturesfolder = os.environ["aditys"] + "\\Pictures\\"
allfiles = os.listdir(picturesfolder)

class PredictionThread(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
    def run(self):
        prediction.loadModel()
        for eachPicture in allfiles:
            if eachPicture.endswith(".png") or eachPicture.endswith(".jpg"):
                predictions, percentage_probabilities = prediction.predictImage(picturesfolder + eachPicture, result_count=1)
                for prediction, percentage_probability in zip(predictions, probabilities):
                    print(prediction , " : " , percentage_probability)

predictionThread = PredictionThread ()
predictionThread.start()