SlideShare a Scribd company logo
Suche senden
Hochladen
Assignment 6.3.pdf
Melden
D
dash41
Folgen
•
0 gefällt mir
•
16 views
Daten & Analysen
big data
Mehr lesen
Assignment 6.3.pdf
•
0 gefällt mir
•
16 views
D
dash41
Folgen
Melden
Daten & Analysen
big data
Mehr lesen
Assignment 6.3.pdf
1 von 2
Jetzt herunterladen
Recomendados
Assignment7.pdf
dash41
37 views
•
6 Folien
Assignment 6.2b.pdf
dash41
9 views
•
4 Folien
Assignment 6.2a.pdf
dash41
10 views
•
4 Folien
Assignment 6.1.pdf
dash41
14 views
•
4 Folien
Assignment 5.3.pdf
dash41
19 views
•
4 Folien
Assignment 5.2.pdf
dash41
4 views
•
7 Folien
Más contenido relacionado
Último
Supercharging your Data with Azure AI Search and Azure OpenAI
Peter Gallagher
35 views
•
32 Folien
The Business Tycoons (Jan-2023) - The Unparalleled Digital Leaders
Global India Business Forum
14 views
•
44 Folien
Journey of Generative AI
thomasjvarghese49
18 views
•
37 Folien
Microsoft Fabric.pptx
Shruti Chaurasia
19 views
•
5 Folien
GA4 - Google Analytics 4 - Session Metrics.pdf
GA4 Tutorials
20 views
•
14 Folien
Data structure and algorithm.
Abdul salam
12 views
•
24 Folien
Último
(20)
Supercharging your Data with Azure AI Search and Azure OpenAI
Peter Gallagher
•
35 views
The Business Tycoons (Jan-2023) - The Unparalleled Digital Leaders
Global India Business Forum
•
14 views
Journey of Generative AI
thomasjvarghese49
•
18 views
Microsoft Fabric.pptx
Shruti Chaurasia
•
19 views
GA4 - Google Analytics 4 - Session Metrics.pdf
GA4 Tutorials
•
20 views
Data structure and algorithm.
Abdul salam
•
12 views
PROGRAMME.pdf
HiNedHaJar
•
14 views
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
vikas12611618
•
8 views
Short Story Assignment by Kelly Nguyen
kellynguyen01
•
14 views
Survey on Factuality in LLM's.pptx
NeethaSherra1
•
5 views
JConWorld_ Continuous SQL with Kafka and Flink
Timothy Spann
•
91 views
3196 The Case of The East River
ErickANDRADE90
•
11 views
Launch of the Knowledge Exchange Platform - Romina Boarini - 21 November 2023
StatsCommunications
•
55 views
Understanding Hallucinations in LLMs - 2023 09 29.pptx
Greg Makowski
•
10 views
ColonyOS
JohanKristiansson6
•
9 views
Cross-network in Google Analytics 4.pdf
GA4 Tutorials
•
6 views
PTicketInput.pdf
stuartmcphersonflipm
•
314 views
MOSORE_BRESCIA
Federico Karagulian
•
5 views
Introduction to Microsoft Fabric.pdf
ishaniuudeshika
•
21 views
Building Real-Time Travel Alerts
Timothy Spann
•
102 views
Destacado
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
19.3K views
•
69 Folien
Getting into the tech field. what next
Tessa Mero
4.8K views
•
22 Folien
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
5.6K views
•
99 Folien
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
4.1K views
•
19 Folien
Introduction to Data Science
Christy Abraham Joy
82.1K views
•
51 Folien
Time Management & Productivity - Best Practices
Vit Horky
169.6K views
•
42 Folien
Destacado
(20)
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
•
19.3K views
Getting into the tech field. what next
Tessa Mero
•
4.8K views
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
•
5.6K views
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
•
4.1K views
Introduction to Data Science
Christy Abraham Joy
•
82.1K views
Time Management & Productivity - Best Practices
Vit Horky
•
169.6K views
The six step guide to practical project management
MindGenius
•
36.6K views
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
•
12.5K views
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
•
55.4K views
12 Ways to Increase Your Influence at Work
GetSmarter
•
401.6K views
ChatGPT webinar slides
Alireza Esmikhani
•
30.3K views
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
•
6.9K views
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
•
3.6K views
Barbie - Brand Strategy Presentation
Erica Santiago
•
25.1K views
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
•
25.2K views
Introduction to C Programming Language
Simplilearn
•
8.4K views
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
Palo Alto Software
•
88.3K views
9 Tips for a Work-free Vacation
Weekdone.com
•
7.2K views
I Rock Therefore I Am. 20 Legendary Quotes from Prince
Empowered Presentations
•
142.8K views
How to Map Your Future
SlideShop.com
•
275.1K views
Assignment 6.3.pdf
1.
Downloading data from
https://storage.googleapis.com/tensorflow/keras-applications/r esnet/resnet50_weights_tf_dim_ordering_tf_kernels.h5 102973440/102967424 [==============================] - 153s 1us/step ('C:/Users/walee/Desktop/Adil Khan/Big Data/DSC 650/Assignments/Assignment 06/image s/cat1.PNG', [[('n02124075', 'Egyptian_cat', 0.40473214), ('n02123045', 'tabby', 0.3 7820032), ('n02123159', 'tiger_cat', 0.18440679), ('n02127052', 'lynx', 0.02030049), ('n02120505', 'grey_fox', 0.0031651843), ('n02356798', 'fox_squirrel', 0.000663975 2), ('n02129604', 'tiger', 0.0004948665), ('n02128757', 'snow_leopard', 0.0004507356 2), ('n03958227', 'plastic_bag', 0.00036802635), ('n02128385', 'leopard', 0.00035691 64)]]) In [1]: import glob, os import numpy as np from keras.preprocessing.image import load_img from keras.preprocessing.image import img_to_array from keras.applications.resnet50 import preprocess_input from keras.applications.imagenet_utils import preprocess_input,decode_predictions import matplotlib.pyplot as plt from tensorflow.keras.applications import resnet50 resnet_model = resnet50.ResNet50(weights='imagenet') In [2]: def run_prediction(filename): input_image = load_img(filename, target_size=(224, 224)) plt.imshow(input_image) plt.show() # convert the image to a numpy array numpy_image = img_to_array(input_image) image_batch = np.expand_dims(numpy_image,axis=0) image_procesed= preprocess_input(image_batch) prediction=resnet_model.predict(image_procesed) output=filename, decode_predictions(prediction, top=10) print(output) with open('Results/predictions/resnet50/results.txt', 'a') as f: f.writelines(str(output)) In [5]: filename = 'C:/Users/walee/Desktop/Adil Khan/Big Data/DSC 650/Assignments/Assignment run_prediction(filename) In [6]: filename2 = 'C:/Users/walee/Desktop/Adil Khan/Big Data/DSC 650/Assignments/Assignmen run_prediction(filename2)
2.
('C:/Users/walee/Desktop/Adil Khan/Big Data/DSC
650/Assignments/Assignment 06/image s/cat2.PNG', [[('n02123045', 'tabby', 0.6036403), ('n02124075', 'Egyptian_cat', 0.30 550975), ('n02123159', 'tiger_cat', 0.023157293), ('n02127052', 'lynx', 0.00862331 1), ('n04493381', 'tub', 0.005825389), ('n02909870', 'bucket', 0.004084795), ('n0348 2405', 'hamper', 0.003631829), ('n02123394', 'Persian_cat', 0.0030924305), ('n079308 64', 'cup', 0.0030116315), ('n04209239', 'shower_curtain', 0.0025875547)]]) ('C:/Users/walee/Desktop/Adil Khan/Big Data/DSC 650/Assignments/Assignment 06/image s/human.PNG', [[('n03617480', 'kimono', 0.2810746), ('n02963159', 'cardigan', 0.0987 3904), ('n04136333', 'sarong', 0.09751529), ('n03866082', 'overskirt', 0.08254426), ('n03877472', 'pajama', 0.065047406), ('n03450230', 'gown', 0.051486332), ('n0431117 4', 'steel_drum', 0.026140286), ('n04325704', 'stole', 0.014662189), ('n03534580', 'hoopskirt', 0.014379749), ('n02948072', 'candle', 0.013780539)]]) In [8]: filename3 = 'C:/Users/walee/Desktop/Adil Khan/Big Data/DSC 650/Assignments/Assignmen run_prediction(filename3) In [ ]:
Jetzt herunterladen