Skip to content

Commit cab1bfc

Browse files
authored
Add files via upload
1 parent 69ceebd commit cab1bfc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Deeplearning.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from imageai.Classification import ImageClassification
2+
import os
3+
executionpath=os.getcwd()
4+
print(executionpath)
5+
detection=ImageClassification()
6+
detection.setModelTypeAsResNet50()
7+
detection.setModelPath(executionpath + "/resnet50_imagenet_tf.2.0.h5")
8+
detection.loadModel()
9+
detections,percentageprobabilites=detection.classifyImage("Testimage.jpg",result_count=5)
10+
for Index in range(len(detections)):
11+
print(detections[Index],":",percentageprobabilites[Index])

0 commit comments

Comments
 (0)