Course Title: CS591-Advance Artificial Intelligence StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara SEMOID#S02023694
StudentEmail: [email protected] Date:04/20/2021
Violations of academic honesty represent a serious breach of discipline and may be considered grounds for disciplinary action, including dismissal
from the University. The University requires that all assignments submitted to faculty members by students be the work of the individual student
submitting the work. An exception would be group projects assigned by the instructor. (Source: SEMO website)
Advanced Artificial Intelligence Assignment
Graduate project level 2
Abstract
Artificial Intelligence (AI) is a crucial technical technology that is commonly used in today's
society. Deep Learning, in particular, has a variety of uses due to its ability to learn robust
representations from images. A Convolutional Neural Network (CNN) is a Deep Learning
algorithm which commands the input image, assigns significance to numerous aspects/objects in
the image, and can distinguish between them. For image classification, CNN is the most popular
Deep Learning architecture. To get better results, we used various automated processing tasks for
fruit and vegetable images. In comparison to other classification deep learning algorithms, the
amount of pre-processing needed by a CNN model is much lower. Furthermore, the learning
capabilities of Deep Learning architectures can be used to improve sound classification in order
to solve efficiency problems. CNN is used in this project, and layers are created to classify the
sound waves into their various categories.
Introduction
We humans enjoy analyzing items, and everything you can think of can be classified into a
classification or class. It is an everyday issue in business; analysis of parts, installations,
gatherings, and products are necessary for the daily routine. This is the reason why people have
devised procedures such as Machine Learning (ML), Neural Networks (NN), and Deep Learning
(DL), among other calculations, to automate the arrangement period. Deep learning will be one
of them that we will explore. Deep learning is an artificial intelligence (AI) function that
simulates how the human brain processes data and creates patterns to make decisions. The
classification of photographs of fruits and vegetables with the naked eye is very difficult. As a
result, we're using pyTorch to process image datasets with Deep Learning. We're developing a
CNN model for image detection and categorization using these datasets. A custom CNN is
introduced and then compared to a ResNet CNN for the purposes of this study. The oth ...
Python Notes for mca i year students osmania university.docx
Course Title CS591-Advance Artificial Intelligence
1. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Advanced Artificial Intelligence Assignment
Graduate project level 2
Abstract
Artificial Intelligence (AI) is a crucial technical technology that
is commonly used in today's
society. Deep Learning, in particular, has a variety of uses due
to its ability to learn robust
2. representations from images. A Convolutional Neural Network
(CNN) is a Deep Learning
algorithm which commands the input image, assigns
significance to numerous aspects/objects in
the image, and can distinguish between them. For image
classification, CNN is the most popular
Deep Learning architecture. To get better results, we used
various automated processing tasks for
fruit and vegetable images. In comparison to other classification
deep learning algorithms, the
amount of pre-processing needed by a CNN model is much
lower. Furthermore, the learning
capabilities of Deep Learning architectures can be used to
improve sound classification in order
to solve efficiency problems. CNN is used in this project, and
layers are created to classify the
sound waves into their various categories.
Introduction
We humans enjoy analyzing items, and everything you can think
of can be classified into a
classification or class. It is an everyday issue in business;
analysis of parts, installations,
gatherings, and products are necessary for the daily routine.
3. This is the reason why people have
devised procedures such as Machine Learning (ML), Neural
Networks (NN), and Deep Learning
(DL), among other calculations, to automate the arrangement
period. Deep learning will be one
of them that we will explore. Deep learning is an artificial
intelligence (AI) function that
simulates how the human brain processes data and creates
patterns to make decisions. The
classification of photographs of fruits and vegetables with the
naked eye is very difficult. As a
result, we're using pyTorch to process image datasets with Deep
Learning. We're developing a
CNN model for image detection and categorization using these
datasets. A custom CNN is
introduced and then compared to a ResNet CNN for the
purposes of this study. The other is
sound classification, in which we classify specific sounds and
measure their accuracy using
datasets given by ultrasound8k.
[1] Fruits, Vegetables and Deep Learning Processing Image
Datasets with Convolutional
Neural Networks using PyTorch
4. Description: Convolutional Neural Networks or Deep Learning
architectures were developed
form the inspiration of the human brain and how it process
information. CNN are a type of
Neural Network that provides good results in areas such as
image processing, image recognition
and image classification. This is the reason why, based on the
title of this piece, a CNN model is
required.
Convolutional Neural Networks are a branch of Deep Learning.
The human brain and how it
processes knowledge inspired the creation of Convolutional
Neural Networks. CNNs are a type
of Neural Network that performs well in image processing,
image recognition, and image
classification. This is why, as the title of this article suggests, a
CNN model is needed.
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
5. Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
CNNs are a form of artificial neural network that filters data
using convolutional layers for
learning purposes. To create a transformed image, input data
(feature map) is combined with a
convolution kernel (filter).
The input layer, hidden layers (which can range from 1 to the
number required by the
application), and output layer are the three main components of
a CNN. A CNN differs from a
normal Neural Network in that its layers are structured in three
dimensions (width, height, and
depth). Convolution, pooling, normalization, and completely
linked layers make up the hidden
layers.
To put it another way, a CNN is a Deep Learning algorithm that
6. can take images as input, inspect
them in various ways for patterns or artifacts, and then output
the ability to distinguish one from
another.
Steps:
vegetables using CNN and using
PyTorch library.
Question is to analyze
image classification. This dataset, which is available on Kaggle,
includes images of fruits
and vegetables with the following key characteristics:
Total number of images: 90483.
Training set size: 67692 images (one fruit or vegetabl e per
image).
Test set size: 22688 images (one fruit or vegetable per image).
Multi-fruits set size: 103 images (more than one fruit (or fruit
class) per image)
Number of classes: 131 (fruits and vegetables).
Image size: 100x100 pixels.
7. DataSet Size:700MB
sidebar in which you will find
add data option we have to click it and search for dataset
fruits360 and add it.
use GPU processor to execute
our models fastly. It is available in Kaggle for 40 hours to new
users. We also have make
sure the internet is on in Kaggle which is under settings.
code. We first have to load
the directory paths from the dataset and confirm that the
directory have a similar number
of classes. To conform we will display all classes in each
folders of the root directory and
images in some classes to test.
certifiable AI models, it is very basic to
part the dataset into 3 sections:
Training set: used to prepare the model for example process the
misfortune and change
loads of the model utilizing inclination drop.
8. Validation set: used to assess the model while preparing, change
hyperparameters
(learning rate, and so on), and pick the best form of the model.
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Test set: used to analyze various models, or various kinds of
demonstrating approaches,
and report the last exactness of the model.
remembered for the Training
9. catalog would be utilized as Training Dataset, and a similar will
be for the Test registry
as Validation Dataset. The Test set would the Validation
Dataset.
Data Augmentations" will
apply transformations at random. Specifically, each image will
be pad by 10 pixels before
being flipped horizontally with a 50% chance. Finally, a random
20-degree rotation will
be applied. Since the transformation will be applied randomly
and dynamically each time
a specific image is loaded.
ll work with a lot of
data. That data should be
handled by a PC, and PCs have restricted assets. It would be
inconceivable for a machine
to run every one of the 67692 pictures remembered for this
dataset without a moment's
delay. Consequently, you will require data loaders. Fortunately
PyTorch has them.
CNN . Let's define an
10. ImageClassificationBase class and an accuracy function for the
models before we get into
the specifics of each one.
model performs. Finding
the number of labels that were correctly predicted, or the
precision of the forecasts, is a
natural way to do this.
be built on
Residual Blocks and Batch
Normalization. This is so that the effects of the custom CNN
and the ResNet
model(ResNet stands for residual neural networks, which are
pre-trained models in in the
ImageNet dataset) can be compared. The original input is added
back to the output
feature map obtained by moving the input through one or more
convolutional layers by
Residual Block. Batch Normalization, as the name implies,
normalizes the convolutional
layers' inputs by taking them all to the same size. This cuts
down on the time it takes to
train the neural network.
11. Training the Custom CNN
Model. Then we have to do Training to the ResNet CNN Model
which is in a similar
fashion to the custom CNN model.
,Validation Loss ,Validation
Accuracy. The accuracy must be greater then 90% for our
models to use in predictions.
rained
models to make predictions. The
predictions would be identical since both models achieved
greater than 90% accuracy.
save option. So you can
review your work in future.
Source Code:
import os
import torch
import torchvision
import tarfile
12. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
from torchvision.datasets.utils import download_url
from torchvision.datasets import ImageFolder
from torch.utils.data import DataLoader
import torchvision.transforms as tt
13. from torch.utils.data import random_split
from torchvision.utils import make_grid
import matplotlib.pyplot as plt
%matplotlib inline
from tqdm.notebook import tqdm
import torchvision.models as models
# Load the directory paths to the dataset
DATA_DIR = '../input/fruits/fruits-360'
TRAIN_DIR = DATA_DIR + '/Training'
TEST_DIR = DATA_DIR + '/Test'
# Look at the root directory
print('The folders inside the root directory are: ')
print(os.listdir(DATA_DIR))
# The classes are the name of the folders inside the Training
directory
train_classes = os.listdir(TRAIN_DIR)
print('nThe classes on the Training directory are: ')
14. print(train_classes)
print('The Training directory has %s classes.'
%len(train_classes))
# The classes are the name of the folders inside the Test
directory
test_classes = os.listdir(TEST_DIR)
print('nThe classes on the Test directory are: ')
print(test_classes)
print('The Training directory has %s classes. n'
%len(test_classes))
print('nThe images inside the /Training/Apple Red 2 directory
are:')
print(os.listdir(TRAIN_DIR + '/Apple Red 2'))
print('nThe /Training/Apple Red 2 directory has %s images.'
%len(os.listdir(TRAIN_DIR + '/A
pple Red 2')))
print('nThe images inside the /Test/Apple Red 2 directory are:')
print(os.listdir(TEST_DIR + '/Apple Red 2'))
print('nThe /Test/Apple Red 2 directory has %s images.'
%len(os.listdir(TEST_DIR + '/Apple R
15. ed 2')))
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
train_tfms = tt.Compose([tt.RandomCrop(100, padding=10,
padding_mode='reflect'),
tt.RandomHorizontalFlip(),
tt.RandomRotation(20),
tt.ToTensor()
17. batch_size_resnet = 32 # Batch size for resnet CNN model
random_seed = 42
torch.manual_seed(random_seed);
# DataLoaders for Custom CNN Model
train_dl_custom = DataLoader(train_ds, batch_size_custom,
shuffle=True, num_workers=3, pin
_memory=True)
valid_dl_custom = DataLoader(valid_ds, batch_size_custom*2,
num_workers=3, pin_memory=
True)
# DataLoaders for ResNet CNN Model
train_dl_resnet = DataLoader(train_ds, batch_size_resnet,
shuffle=True, num_workers=3, pin_m
emory=True)
valid_dl_resnet = DataLoader(valid_ds, batch_size_resnet*2,
num_workers=3, pin_memory=Tru
e)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpura m Chaitanya
18. sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
def show_batch(dl):
for images, labels in dl:
fig, ax = plt.subplots(figsize=(12, 12))
ax.set_xticks([]); ax.set_yticks([])
ax.imshow(make_grid(images[:64], nrow=8).permute(1, 2,
0))
break
print('train_dl_custom dataloader samples: ')
20. """Move tensor(s) to chosen device"""
if isinstance(data, (list,tuple)):
return [to_device(x, device) for x in data]
return data.to(device, non_blocking=True)
class DeviceDataLoader():
"""Wrap a dataloader to move data to a device"""
def __init__(self, dl, device):
self.dl = dl
self.device = device
def __iter__(self):
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
21. from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
"""Yield a batch of data after moving it to device"""
for b in self.dl:
yield to_device(b, self.device)
def __len__(self):
"""Number of batches"""
return len(self.dl)
device = get_default_device()
device
# Device Data Loader for Custom CNN Model
train_dl_custom = DeviceDataLoader(train_dl_custom, device)
valid_dl_custom = DeviceDataLoader(valid_dl_custom, device)
# Device Data Loader for Custom CNN Model
22. train_dl_resnet = DeviceDataLoader(train_dl_resnet, device)
valid_dl_resnet = DeviceDataLoader(valid_dl_resnet, device)
def accuracy(outputs, labels):
_, preds = torch.max(outputs, dim=1)
return torch.tensor(torch.sum(preds == labels).item() /
len(preds))
class ImageClassificationBase(nn.Module):
def training_step(self, batch):
images, labels = batch
out = self(images)
loss = F.cross_entropy(out, labels) # Calculate
training loss
return loss
def validation_step(self, batch):
images, labels = batch
out = self(images) # Generate
predictions
23. loss = F.cross_entropy(out, labels) # Calculate
validation loss
acc = accuracy(out, labels) # Calculate
accuracy
return {'val_loss': loss.detach(), 'val_acc': acc}
def validation_epoch_end(self, outputs):
batch_losses = [x['val_loss'] for x in outputs]
epoch_loss = torch.stack(batch_losses).mean() #
Combine losses
batch_accs = [x['val_acc'] for x in outputs]
epoch_acc = torch.stack(batch_accs).mean() #
Combine accuracies
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for discipli nary
action, including dismissal
24. from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
return {'val_loss': epoch_loss.item(), 'val_acc':
epoch_acc.item()}
def epoch_end(self, epoch, result):
print("Epoch [{}], last_lr: {:.10f}, train_loss: {:.4f},
val_loss: {:.4f}, val_acc: {:.4f}".format(
epoch, result['lrs'][-1], result['train_loss'],
result['val_loss'], result['val_acc']))
def conv_block(in_channels, out_channels, pool=False):
layers = [nn.Conv2d(in_channels, out_channels,
kernel_size=3, padding=1),
nn.BatchNorm2d(out_channels), # Batch
Normalization
nn.ReLU(inplace=True)]
if pool: layers.append(nn.MaxPool2d(2))
return nn.Sequential(*layers)
25. class CustomCNN(ImageClassificationBase):
def __init__(self, in_channels, num_classes):
super().__init__()
self.conv1 = conv_block(in_channels, 128)
# 3 x 64 x 64
self.conv2 = conv_block(128, 256, pool=True)
# 128 x 32 x 32
self.res1 = nn.Sequential(conv_block(256, 256),
conv_block(256, 256)) # 256 x 32 x 32
self.conv3 = conv_block(256, 512, pool=True)
# 512 x 16 x 16
self.conv4 = conv_block(512, 1024, pool=True)
# 1024 x 8 x 8
self.res2 = nn.Sequential(conv_block(1024, 1024),
conv_block(1024, 1024)) # 1024 x 8 x 8
self.conv5 = conv_block(1024, 2048, pool=True)
# 256 x 8 x 8
self.conv6 = conv_block(2048, 4096, pool=True)
# 512 x 4 x 4
self.res3 = nn.Sequential(conv_block(4096, 4096),
26. conv_block(4096, 4096)) # 512 x 4 x 4
self.classifier = nn.Sequential(nn.MaxPool2d(4),
# 9216 x 1 x 1
nn.Flatten(), #
9216
nn.Linear(9216, num_classes))
# 131
def forward(self, xb):
out = self.conv1(xb)
out = self.conv2(out)
out = self.res1(out) + out # Residual Block
out = self.conv3(out)
out = self.conv4(out)
out = self.res2(out) + out # Residual Block
out = self.classifier(out)
return out
# remove the + out to see the differences of adding the
output at the end
27. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
class ResNetCNN(ImageClassificationBase):
def __init__(self):
super().__init__()
# Use a pretrained model
self.network = models.resnet34(pretrained=True) # You
can change the resnet model her
e
28. # Replace last layer
num_ftrs = self.network.fc.in_features
self.network.fc = nn.Linear(num_ftrs, 131) # Output
classes
def forward(self, xb):
return torch.sigmoid(self.network(xb))
def freeze(self):
# To freeze the residual layers
for param in self.network.parameters():
param.require_grad = False
for param in self.network.fc.parameters():
param.require_grad = True
def unfreeze(self):
# Unfreeze all layers
for param in self.network.parameters():
param.require_grad = True
29. @torch.no_grad()
def evaluate(model, val_loader):
print('Evaluating Model ...')
model.eval()
outputs = [model.validation_step(batch) for batch in
tqdm(val_loader)]
return model.validation_epoch_end(outputs)
def get_lr(optimizer):
for param_group in optimizer.param_groups:
return param_group['lr']
def fit_one_cycle(epochs, max_lr, model, train_loader,
val_loader,
weight_decay=0, grad_clip=None,
opt_func=torch.optim.SGD):
torch.cuda.empty_cache()
history = []
# Set up cutom optimizer with weight decay
30. optimizer = opt_func(model.parameters(), max_lr,
weight_decay=weight_decay)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
# Set up one-cycle learning rate scheduler
sched = torch.optim.lr_scheduler.OneCycleLR(optimizer,
max_lr, epochs=epochs,
steps_per_epoch=len(train_loader))
31. for epoch in range(epochs):
# Training Phase
model.train()
train_losses = []
lrs = []
print('nTraining Model ...')
for batch in tqdm(train_loader):
loss = model.training_step(batch)
train_losses.append(loss)
loss.backward()
# Gradient clipping
if grad_clip:
nn.utils.clip_grad_value_(model.parameters(),
grad_clip)
optimizer.step()
optimizer.zero_grad()
# Record & update learning rate
33. custom_model = to_device(CustomCNN(input_channels,
output_classes), device)
custom_model
for images, labels in train_dl_custom:
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
print('images.shape:', images.shape)
out = custom_model(images)
print('out.shape:', out.shape)
36. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
accuracies = [x['val_acc'] for x in history]
plt.plot(accuracies, '-x')
plt.xlabel('epoch')
plt.ylabel('accuracy')
plt.title(model_name + ' - Accuracy vs. No. of epochs');
def plot_losses(history, model_name):
train_losses = [x.get('train_loss') for x in history]
37. val_losses = [x['val_loss'] for x in history]
plt.plot(train_losses, '-bx')
plt.plot(val_losses, '-rx')
plt.xlabel('epoch')
plt.ylabel('loss')
plt.legend(['Training', 'Validation'])
plt.title(model_name + ' - Loss vs. No. of epochs');
def plot_lrs(history, model_name):
lrs = np.concatenate([x.get('lrs', []) for x in history])
plt.plot(lrs)
plt.xlabel('Batch no.')
plt.ylabel('Learning rate')
plt.title(model_name + ' - Learning Rate vs. Batch no.');
plot_accuracies(history_CustomCNN, 'Custom CNN Model')
plot_losses(history_CustomCNN, 'Custom CNN Model')
plot_lrs(history_CustomCNN, 'Custom CNN Model')
38. plot_accuracies(history_ResNetCNN, 'ResNet CNN Model')
plot_losses(history_ResNetCNN, 'ResNet CNN Model')
plot_lrs(history_ResNetCNN, 'ResNet CNN Model')
def predict_image(img, model):
# Convert to a batch of 1
xb = to_device(img.unsqueeze(0), device)
# Get predictions from model
yb = model(xb)
# Pick index with highest probability
_, preds = torch.max(yb, dim=1)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
39. discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
# Retrieve the class label
return valid_ds.classes[preds[0].item()]
img, label = valid_ds[2569]
plt.imshow(img.permute(1, 2, 0))
print('Label:', valid_ds.classes[label], ', Predicted:',
predict_image(img, custom_model))
img, label = valid_ds[9856]
plt.imshow(img.permute(1, 2, 0))
print('Label:', valid_ds.classes[label], ', Predicted:',
predict_image(img, custom_model))
Screenshots:
40. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
41. Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
42. assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
43. StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
44. action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
45. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
46. SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
47. assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
48. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
49. Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
50. assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
51. sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
52. from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
53. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
54. StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
55. work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
56. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
57. Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
58. assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
59. StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
60. action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
61. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
62. SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
63. assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
[2] Sound Classification using Deep Learning
Definition: Sound plays an important role in every aspect of
human life. Sound is a crucial
component in the development of automated systems in a
variety of fields, from personal
security to critical surveillance. While a few systems are
already on the market, their reliability is
a problem for their use in real-world scenarios. Recent advances
in image classification, where
convolutional neural networks are used to classify images with
high precision and at scale, raises
the question of whether these techniques can be applied to other
domains, such as sound
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
64. SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
classification. In this project, we are going to demonstrate how
deep learning is used for sound
classification.
Deep learning architectures' learning capabilities can be used to
build sound classification
systems that resolve the inefficiencies of traditional systems.
We created a sequential model with
the following specifications using the Keras library and
TensorFlow. The convolutional neural
network was a two-layer deep architecture with a completely
linked final layer and an output
prediction layer.
65. Some of the real world applications for deep learning are:
-degree protection and security
capabilities
Steps:
The steps for classifying sound using Deep Learning are as
follows:
1) Data Exploration and Visualisation
2) Data Pre-processing and Data Splitting
3) Model Training and Evaluation
4) Model Refinement
Description:
1) Data Exploring and Visualization:
The “Urbansound8K Dataset" will be used because the aim of
this Question is to analyze sound
classification. There are 8732 sound samples (=4s) of urban
sounds in the dataset, divided into
ten categories: They are
66. r Horn
patterns in the results. We'll
load the audio file into an array with librosa, then show the
waveform with
librosa.display and matplotlib. Here, we will also add the
urbansoundmetadata.csv file
into the panda frame.
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
67. StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
for each of the audio sample files, we'll extract the
number of audio channels,
sample rate, and bit-depth.
2) Data Pre-processing and Data Splitting:
-process the data to make
dataset consistent in audio
channels, sample rate and bit-depth.
remove complications of bit-
depths.
and store it in a Panda
68. Dataframe along with it's classification label and encode the
categorical text data into
model-understandable numerical data, using
sklearn.preprocessing.LabelEncoder
function.
sets by using
sklearn.model_selection.train_test_split function.
3) Model Training and Evaluation:
accuracy on both the training
and test data sets.
predictions on a particular
audio.wav file.
4) Model Refinement:
testing data is low. So, to improve
the accuracy we will be using Convolutional Neural Network
(CNN) in this step.
ors all the same size by zero.
corresponds to the number of
69. classifications that can be created. The model would then make
a prediction based on
which alternative has the best chance of succeeding.
convert our model back to a
Convolutional Neural Network (CNN and start training the
dataset with a small number
of epochs and a small batch size because training a CNN can
take a long time. If the
output indicates that the model is convergent, we can increase
both numbers.
accuracy increased by 6%
and testing accuracy increased by 4%.
ferent sounds that weren't
included in either our test or
training data to further validate our model.
Course Title: CS591-Advance Artificial Intelligence
70. StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Source Code:
import IPython.display as ipd
ipd.Audio('../UrbanSound Dataset sample/audio/100032-3-0-
0.wav')
# Load imports
import IPython.display as ipd
import librosa
71. import librosa.display
import matplotlib.pyplot as plt
# Class: Air Conditioner
filename = '../UrbanSound Dataset sample/audio/100852-0-0-
0.wav'
plt.figure(figsize=(12,4))
data,sample_rate = librosa.load(filename)
_ = librosa.display.waveplot(data,sr=sample_rate)
ipd.Audio(filename)
# Class: Car horn
filename = '../UrbanSound Dataset sample/audio/100648-1-0-
0.wav'
plt.figure(figsize=(12,4))
data,sample_rate = librosa.load(filename)
_ = librosa.display.waveplot(data,sr=sample_rate)
ipd.Audio(filename)
# Class: Children playing
73. Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
ipd.Audio(filename)
# Class: Drilling
filename = '../UrbanSound Dataset sample/audio/103199-4-0-
0.wav'
plt.figure(figsize=(12,4))
data,sample_rate = librosa.load(filename)
_ = librosa.display.waveplot(data,sr=sample_rate)
ipd.Audio(filename)
# Class: Engine Idling
filename = '../UrbanSound Dataset sample/audio/102857-5-0-
0.wav'
75. ipd.Audio(filename)
# Class: Siren
filename = '../UrbanSound Dataset sample/audio/102853-8-0-
0.wav'
plt.figure(figsize=(12,4))
data,sample_rate = librosa.load(filename)
_ = librosa.display.waveplot(data,sr=sample_rate)
ipd.Audio(filename)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
76. assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
# Class: Street music
filename = '../UrbanSound Dataset sample/audio/101848-9-0-
0.wav'
plt.figure(figsize=(12,4))
data,sample_rate = librosa.load(filename)
_ = librosa.display.waveplot(data,sr=sample_rate)
ipd.Audio(filename)
import pandas as pd
metadata = pd.read_csv('../UrbanSound Dataset
sample/metadata/UrbanSound8K.csv')
metadata.head()
print(metadata.class_name.value_counts())
# Load various imports
import pandas as pd
77. import os
import librosa
import librosa.display
from helpers.wavfilehelper import WavFileHelper
wavfilehelper = WavFileHelper()
audiodata = []
for index, row in metadata.iterrows():
file_name =
os.path.join(os.path.abspath('/Volumes/Untitled/ML_Data/Urba
n Sound/UrbanSo
und8K/audio/'),'fold'+str(row["fold"])+'/',str(row["slice_file_na
me"]))
data = wavfilehelper.read_file_properties(file_name)
audiodata.append(data)
# Convert into a Panda dataframe
audiodf = pd.DataFrame(audiodata,
columns=['num_channels','sample_rate','bit_depth'])
78. # num of channels
print(audiodf.num_channels.value_counts(normalize=True))
# sample rates
print(audiodf.sample_rate.value_counts(normalize=True))
# bit depth
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
81. mfccsscaled = np.mean(mfccs.T,axis=0)
except Exception as e:
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
print("Error encountered while parsing file: ", file)
return None
return mfccsscaled
82. # Load various imports
import pandas as pd
import os
import librosa
# Set the path to the full UrbanSound dataset
fulldatasetpath = '/Volumes/Untitled/ML_Data/Urban
Sound/UrbanSound8K/audio/'
metadata = pd.read_csv('../UrbanSound Dataset
sample/metadata/UrbanSound8K.csv')
features = []
# Iterate through each sound file and extract the features
for index, row in metadata.iterrows():
file_name =
os.path.join(os.path.abspath(fulldatasetpath),'fold'+str(row["fol
d"])+'/',str(row["sli
ce_file_name"]))
class_label = row["class_name"]
83. data = extract_features(file_name)
features.append([data, class_label])
# Convert into a Panda dataframe
featuresdf = pd.DataFrame(features,
columns=['feature','class_label'])
print('Finished feature extraction from ', len(featuresdf), ' files')
from sklearn.preprocessing import LabelEncoder
from keras.utils import to_categorical
# Convert features and corresponding classification labels into
numpy arrays
X = np.array(featuresdf.feature.tolist())
y = np.array(featuresdf.class_label.tolist())
# Encode the classification labels
le = LabelEncoder()
yy = to_categorical(le.fit_transform(y))
84. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
# split the dataset
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(X, yy,
test_size=0.2, random_state = 42)
### store the preprocessed data for use in the next notebook
%store x_train
85. %store x_test
%store y_train
%store y_test
%store yy
%store le
# retrieve the preprocessed data from previous notebook
%store -r x_train
%store -r x_test
%store -r y_train
%store -r y_test
%store -r yy
%store -r le
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.optimizers import Adam
86. from keras.utils import np_utils
from sklearn import metrics
num_labels = yy.shape[1]
filter_size = 2
# Construct model
model = Sequential()
model.add(Dense(256, input_shape=(40,)))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Dense(256))
model.add(Activation('relu'))
model.add(Dropout(0.5))
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
87. sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
model.add(Dense(num_labels))
model.add(Activation('softmax'))
# Compile the model
model.compile(loss='categorical _crossentropy',
metrics=['accuracy'], optimizer='adam')
# Display model architecture summary
model.summary()
# Calculate pre-training accuracy
89. # Evaluating the model on the training and testing set
score = model.evaluate(x_train, y_train, verbose=0)
print("Training Accuracy: ", score[1])
score = model.evaluate(x_test, y_test, verbose=0)
print("Testing Accuracy: ", score[1])
import librosa
import numpy as np
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
90. assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
def extract_feature(file_name):
try:
audio_data, sample_rate = librosa.load(file_name,
res_type='kaiser_fast')
mfccs = librosa.feature.mfcc(y=audio_data,
sr=sample_rate, n_mfcc=40)
mfccsscaled = np.mean(mfccs.T,axis=0)
except Exception as e:
print("Error encountered while parsing file: ", file)
return None, None
return np.array([mfccsscaled])
def print_prediction(file_name):
prediction_feature = extract_feature(file_name)
92. # Class: Street music
filename = '../UrbanSound Dataset sample/audio/101848-9-0-
0.wav'
print_prediction(filename)
# Class: Car Horn
filename = '../UrbanSound Dataset sample/audio/100648-1-0-
0.wav'
print_prediction(filename)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
93. submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
filename = '../Evaluation audio/dog_bark_1.wav'
print_prediction(filename)
filename = '../Evaluation audio/drilling_1.wav'
print_prediction(filename)
filename = '../Evaluation audio/gun_shot_1.wav'
print_prediction(filename)
# sample data weighted towards gun shot - peak in the dog
barking sample is simmilar in shape t
o the gun shot sample
filename = '../Evaluation audio/siren_1.wav'
print_prediction(filename)
# retrieve the preprocessed data from previous notebook
95. print("Error encountered while parsing file: ", file_name)
return None
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
return mfccs
# Load various imports
import pandas as pd
96. import os
import librosa
# Set the path to the full UrbanSound dataset
fulldatasetpath = '/Volumes/Untitled/ML_Data/Urban
Sound/UrbanSound8K/audio/'
metadata = pd.read_csv('../UrbanSound Dataset
sample/metadata/UrbanSound8K.csv')
features = []
# Iterate through each sound file and extract the features
for index, row in metadata.iterrows():
file_name =
os.path.join(os.path.abspath(fulldatasetpath),'fold'+str(row["fol
d"])+'/',str(row["sli
ce_file_name"]))
class_label = row["class_name"]
data = extract_features(file_name)
features.append([data, class_label])
97. # Convert into a Panda dataframe
featuresdf = pd.DataFrame(features,
columns=['feature','class_label'])
print('Finished feature extraction from ', len(featuresdf), ' file s')
from sklearn.preprocessing import LabelEncoder
from keras.utils import to_categorical
# Convert features and corresponding classification labels into
numpy arrays
X = np.array(featuresdf.feature.tolist())
y = np.array(featuresdf.class_label.tolist())
# Encode the classification labels
le = LabelEncoder()
yy = to_categorical(le.fit_transform(y))
# split the dataset
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(X, yy,
98. test_size=0.2, random_state = 42)
import numpy as np
from keras.models import Sequential
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, Conv2D,
MaxPooling2D, GlobalAveragePooling2D
from keras.optimizers import Adam
101. # Calculate pre-training accuracy
score = model.evaluate(x_test, y_test, verbose=1)
accuracy = 100*score[1]
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
print("Pre-training accuracy: %.4f%%" % accuracy)
from keras.callbacks import ModelCheckpoint
102. from datetime import datetime
#num_epochs = 12
#num_batch_size = 128
num_epochs = 72
num_batch_size = 256
checkpointer =
ModelCheckpoint(filepath='saved_models/weights.best.basic_cn
n.hdf5',
verbose=1, save_best_only=True)
start = datetime.now()
model.fit(x_train, y_train, batch_size=num_batch_size,
epochs=num_epochs, validation_data=(x
_test, y_test), callbacks=[checkpointer], verbose=1)
duration = datetime.now() - start
print("Training completed in time: ", duration)
# Evaluating the model on the training and testing set
score = model.evaluate(x_train, y_train, verbose=0)
104. filename = '../UrbanSound Dataset sample/audio/100852-0-0-
0.wav'
print_prediction(filename)
# Class: Drilling
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
filename = '../UrbanSound Dataset sample/audio/103199-4-0-
0.wav'
106. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
107. SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
108. assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
109. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinar y
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
110. Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
111. assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
112. sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
113. from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
114. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
115. StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
116. submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
117. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
118. discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
119. Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
120. SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
121. assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Course Title: CS591-Advance Artificial Intelligence
StudentName: Namratha Valle, Malemarpuram Chaitanya
sai, Sasidhar Reddy Vajrala, Nagendra Mokara
SEMOID#S02023694
StudentEmail: [email protected]
Date:04/20/2021
Violations of academic honesty represent a serious breach of
discipline and may be considered grounds for disciplinary
action, including dismissal
from the University. The University requires that all
assignments submitted to faculty members by students be the
work of the individual student
submitting the work. An exception would be group projects
assigned by the instructor. (Source: SEMO website)
Conclusion:
122. The results indicate that the Custom Model produced better
results than the ResNet Model
implemented in the PyTorch module, even though training took
longer time. The Custom Model
was 99.21 percent accurate, while the ResNet Model was just
92.45 percent accurate. In contrast
to the ResNet Model, the Custom Model was able to reduce
training and validation losses.
The results of UrbanSound data indicate that our trained model
has a Training accuracy of
98.19% and a Testing accuracy of 91.92%.
References:
1. Aguilar, F. (2020, July 19). Fruits, Vegetables and Deep
Learning - Level Up Coding.
Medium. https://levelup.gitconnected.com/fruits-vegetables-
and-deep-learning-
c5814c59fcc9
2. Smales, M. (2021, February 12). Sound Classification using
Deep Learning - Mike
Smales. Medium. https://mikesmales.medium.com/sound-
classification-using-deep-
learning-8bc2aa1990b7
List of contributions: Every one of us worked in each aspect to
accomplish the task and meet
the given requirements so that each of us can get a clear idea of
123. the topic.
Demonstration Coding Documentation
Sasidhar Reddy Vajrala 25% 25% 25%
Namratha Valle 25% 25% 25%
Malemarpuram Chaitanya sai 25% 25% 25%
Nagendra Mokara 25% 25% 25%
https://levelup.gitconnected.com/fruits-vegetables-and-deep-
learning-c5814c59fcc9
https://levelup.gitconnected.com/fruits-vegetables-and-deep-
learning-c5814c59fcc9
https://mikesmales.medium.com/sound-classification-using-
deep-learning-8bc2aa1990b7
https://mikesmales.medium.com/sound-classification-using-
deep-learning-8bc2aa1990b7
GOAL: Collect all the details for the outline and expand into a
meaningful report containing the 3-4 items that will go into
your individual/group portfolio.
DELIVERABLE:
1. Front page containing - your name and period of study in CS
dept with the University logo
2. Complete index for the entire document
3. For each project, pls include material that is applicable:
· Name of Advisor / Professor under whom this project was
conducted
· Purpose and keywords (example 1 (Links to an external
site.) , example 2
· Related Work (Reference articles and video tutorials) about
state-of-art and explaining the merit of your work: 0.5 page
(minimum) for each project
· References - IEEE style for works referenced below.
· Procedure including algorithms and pseudocode: (2-5 pages
124. WITHOUT screenshots for each project)
· Original block diagrams and comparison schemes explaining
functionality of each block
· Pseudocode showing the main components of algorithm
· Link to your git repository (if applicable)
· (Pls avoid screenshots until and unless absolutely necessary)
Submission details:
· File type - PDF
· Font - 12 point, single spaced, 1-inch margin
· Margin:
· top and bottom: 1 inch
· left and right: 0.75 inch
GOAL: To prepare an OUTLINE of your GRADUATE-
level group portfolio.
DETAILS: A portfolio is a personalized collection of most
significant academic works. This can include various projects,
assignments, papers, presentations that were completed during
the student members' period of study Masters level.
DELIVERABLE: For each project, you need to answer the
following questions (at least 500 words):
1. What was the goal?
2. Motivation and purpose of the project
3. How did you solve the problem? What was the team members
contribution?
· Which algorithms used?
· What was the basis of the solution?
· Which language did you use? How to deploy your solution?
· Evaluation, Validation and Key results
· 4-5 keywords to describe your project
Submission details:
· Font - 12 point, single spaced, 1-inch margin
125. GOAL: ADDRESS feedback comments in midterm report.
SUBMIT final portfolio and exit interview questionnaire.
FINAL REPORT: For each project,
1. ADD the "
Abstract" from Portfolio Outline as an introductory
page for each of your projects.
·
Portfolio Outline
2. ADD 3-5 meaningful
keywords for each project.
3. EXTEND your
midterm portfolio: for each project, pls include material
that is applicable:
(2-5 pages for each project)
· Name of Advisor / Professor under whom this project was
conducted
· Who is the audience for your work in each project? Who will
find this most helpful? Why?
· Design diagrams - process and data flow
· presentable and useful - use icons, presentable colors, clear
fonts
· Evaluation, Validation and Key results
· How did you know that your project is "working"?
· Proof of work: screenshots showing working module
· Experimental results supporting your hypothesis/goal.
· Conclusion & Future work - how to take this work further?
Your recommendations to next generation of students for this
project?
· References - IEEE style (at least 5-7 each for every project)
4. INCLUDE
Index for the entire document with page numbers. Each
project should start from a new page.
126. Formatting details:
· File type - PDF
· Font size - 12 point, single spaced, 1-inch margin.
ADDITIONAL INSTRUCTIONS:
1. Consistency
· consistency in formatting and grammar (e.g. no personal
pronounces such as I, me, my, you.)
· consistency in content distribution
· consistency in student contribution
· consistency in preparedness