AI Training2024Haile
AI Training2024Haile
Tech-Assistant at BiTec
Artificial Intelligence
Why should you learn about AI?
1. Future-Proof Career Skills
AI is transforming industries, creating new jobs, and redefining
existing ones. Understanding AI gives a competitive edge in the job market.
3. Staying Informed: Being informed about AI helps students stay updated with
technological advancements & understand the potential and limitations of AI
technologies.
1
Artificial Intelligence
Artificial intelligence (AI), the ability of a digital computer to
perform tasks commonly associated with intelligent beings.
such as
The ability to reason
The ability to make decisions
The ability to Learn /from past experience/
AI can be composed of algorithms & its algorithms can learn from data
2
Application of Artificial intelligence
• Image Recognition
• Forecasting
• Recommendation (TikTok ,Youtube)
• Voice Assistant
• Self-driving Car
• Fraud detection
3
Top AI user companies
for content recommendation and real-time translation on its social
platforms. This helps in delivering personalized content to users and
breaking language barriers, making communication more seamless.
Prediction and Once the AI system is trained, it can make predictions or decisions
Decision Making based on new data
6
Cont..
7
Types of Machine Learning
9
Deep Learning
Convolutional Neural Network (CNN)
A CNN is a neural network designed to automatically and adaptively
learn spatial features from input images. It consists of multiple layers,
including convolutional layers, pooling layers, and fully connected
layers.
Key Components:
• Convolutional Layer
• Pooling Layer
• Fully Connected Layer 10
Cont..
• Convolutional Layers: These layers apply filters (or kernels) to
the input image to create feature maps, highlighting important
features like edges and textures
11
Cont..
12
Cont..
• Fully Connected Layers: similar to neural networks,
we take the features extracted by the convolutional & pooling
layers and use them to classify the image.
13
Cont..
15
Convolutional Neural Network (CNN) Application
Tool needed:
• Programming Language: Python or C
• Libraries: TensorFlow and Keras libraries
18
Cont..
Step1 Install python libraries
pip install tensorflow
Step2 Load the Dataset (dataset of images stored in folders named apples,
bananas, and oranges.)
Train the Model. The CNN model consists of convolutional layers for
feature extraction and pooling layers to reduce spatial dimensions. The
Step3 final dense layers are used for classification.
Step2
Load the Dataset (dataset of images stored in folders named apples,
bananas, and oranges.)
20
Step2 Load the Dataset
# Set up data generators
train_datagen = ImageDataGenerator (rescale=1/255, validation_split=0.2)
train_generator = train_datagen.flow_from_directory (
'path/to/dataset',
target_size=(150, 150),
batch_size=20,
class_mode='categorical',
subset='training‘
)
# 'categorical; to convert the class-mode into one hot encoding, enabling effective
training and accurate classification 21
Cont..
validation_generator = train_datagen.flow_from_directory (
'path/to/dataset',
target_size=(150, 150),
batch_size=20,
class_mode='categorical',
subset='validation‘
)
22
Step3 Train the Model.
trained_model = model.fit (
train_generator,
steps_per_epoch = train_generator.samples / 20,
epochs=10,
validation_data = validation_generator,
validation_steps = validation_generator.samples / 20
)
# Save the model
model.save('fruit_classifier_model.h5')
24
Testing the Model
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing import image
import numpy as np
predicted_class = class_names[np.argmax(predictions)]
26
Our CNN Expected Results
Apple
Banana
Orange
27
Computer Vision
Computer Vision: is a field of technology that enables computers to "see" and
understand the world just like humans do. It's all about teaching computers to
interpret and process visual information from the surrounding environment
• Image Capture: Just like your eyes see things, a computer uses cameras or
sensors to capture images or videos.
30
Computer Vision in Real World
Object Detection & Recognition Example using Python
import cv2
import numpy as np
import yolov5
# Load image
img = cv2.imread("path_to_your_image.jpg")
results = model(img) 31
Object Detection & Facial Recognition Example using Python
# Draw bounding boxes and labels
cv2.imshow("Image", img)
cv2.waitKey(0)
cv2.destroyAllWindows() 32
Object Detection Results
33
AI in Everyday Life
34
Future of AI
35
Thank You
09-21-67-21-01 @ThePlusTech1