Sei sulla pagina 1di 28

Created By:- Ayush Agarwal

Anuj Agarwal
Adarsh kumar Singh
CONTENTS
 Introduction
 What is a Digital Image?
 What is Digital Image Recognition?
 Object Detection
 Process in Image Recognition
 Face detection
 Feature extraction
 Face recognition
 OpenCV an Introduction
 Haar Training
 Flow Chart And Algorithm
 Melody creation
 Midi Recurrent Neural Network
 Conclusion
Introduction
 This is an experiment built with machine learning that
lets you make music with the computer just by taking a
picture. It uses image recognition to label what it sees,
then it turns those labels into lyrics of a song.
 It involves 3 steps
1. Image Recognition/Object Detection
2. Sentence Creation
3. Melody Creation
What is a Digital Image?
A digital image is a numeric representation,
normally binary, of a two-dimensional image.
Depending on whether the image resolution is
fixed, it may be of vector or raster type.
Digital image
What is Digital Image Recognition?
Image recognition is the ability of software to
identify objects, people in images. Computers can use
machine vision technologies in combination with a
camera and artificial intelligence software to
achieve image recognition.
Object detection

 Object detection is a computer technology related


to computer vision and image processing that deals
with detecting instances of semantic objects of a
certain class (such as humans, buildings, or cars) in
digital images and videos. Well-researched domains of
object detection include face detection and pedestrian
detection. Object detection has applications in many
areas of computer vision, including image
retrieval and video surveillance.
Concept
 Every object class has its own special features that
helps in classifying the class – for example
all circles are round. Object class detection uses these
special features. For example, when looking for circles,
objects that are at a particular distance from a point
(i.e. the center) are sought. Similarly, when looking for
squares, objects that are perpendicular at corners and
have equal side lengths are needed. A similar approach
is used for face identification where eyes, nose, and
lips can be found and features like skin color and
distance between eyes can be found.
Process of Face Recognition
The facial recognition process normally has three
interrelated phases or steps:
 Face Detection
 Feature Extraction
 Face recognition
Face Detection
 Face detection just means that a system is able to
identify that there is a human face present in an
image or video. Face detection has several
applications, only one of which is facial
recognition. Face detection can also be used to auto
focus.
Feature Extraction
The first step is the extraction of the
image's features and the second one is the
classification of patterns. Feature extracting is a very
important step in face recognition.
The recognition rate of the system depends on the
meaningful data extracted from the face image.
Face Recognition
 Facial recognition is a biometric software application
capable of uniquely identifying or verifying a person
by comparing and analyzing patterns based on the
person's facial contours. Facial recognition is mostly
used for security purposes, though there is increasing
interest in other areas of use.
OpenCV an Introduction

OpenCV is an open source C++ library for image processing


and computer vision, originally developed by Intel and now
supported by Willow Garage.
It is free for both commercial and non-commercial use. It is a
library of many inbuilt functions mainly aimed at real time
image processing. Now it has several hundreds of image
processing and computer vision algorithms which make
developing advanced computer vision applications easy and
efficient.
Haar-training

 The OpenCV library gives us a greatly interestingdemo for


a object detection. Furthermore, it provides us programs
(or functions) which they used to train classifiers for their
object detection system (called HaarTraining). Thus, we can
create our own object classifiers using thefunctions.
Flow-chart
Gather image set of Capture stream from
object e.g. fish camera

Gather negative image


set without object of While
interest capture

yes
Create vector filesof
positive image set Query frame byframe

Create dat fileof Convert each frameto


negative one’s grayscale

haar training of positive Apply histogram


and negative imagesets equalization on image
to generate xml file
Load haar
cascadefile

Store objects to a variable


faces while using
detectMultiScale method

While
faces

yes

Draw Rectangle
on object
Algorithm part-1
Collect image set of particular object e.g. fish
Crop these images for better haarCascade file
Collect negative image set which doesn’t contain object
Use openCV createsamples utility to generate positive .vec
file for generating variations in image set
Create collection file format .dat file of negative images
using this command
$ find [image dir] -name '*.[image ext]' > [descriptionfile]
Using openCV haartraining utility we will generate xml file
which is called cascade classifier file to detect object.
Algorithm part-2

Use OpenCV for performing real time detection in


video
Use cvCaptureFromCAM to capture from camera
Use cvQueryFrame to quering frame by frame for
processing images to get ROI(Reason of Interest).
Convert image to grayscale image using
COLOR_BGR2GRAY of Imgproc class
Use Histogram Equalization method for more
accuracy.
Algorithm part-2

Using cascadeClassifier class of OpenCV load haar


cascade xml file generated in part 1of algorithm
Use detectMultiScale method of cascadeClassifier
class to detect objects and store them in variable.
Iterate the variable so we can get all ROI
Use rectangle function to generate rectangle on ROI
Codereference

 Code reference could be foundat


http://pastebin.com/Vw00NgCt
 This is visual studio code for detecting object By changing
haar cascade file with haar cascade fish file we can detect
particular classof fish
Melody Creation
 Midi-rnn is a tool we’ve used that allows you to
generate monophonic melodies with machine learning
using a basic LSTM RNN, a model architecture
designed to work with sequences.
 Midi-rnn is an implementation of a Recurrent Neural
Network (RNN) that uses Long-Short Term Memory
(LSTM) units. RNNs architectures have been proven to
work very well at learning to model sequential data
Midi Recurrent Neural Network
 We slide our window across each of our MIDI tracks
collecting X, y pairs to create our data set.
 Each y is used as our training label for the sequence of
notes X in our supervised learning task.
 Once we’ve trained our model by iteratively applying
our training process until our error values stop
decreasing, we freeze our model and use it to generate
new melodies!
Conclusion
 Machine learning is quickly growing field in computer
science. It has applications in nearly every other field
of study and is already being implemented
commercially because machine learning can solve
problems too difficult or time consuming for humans
to solve. To describe machine learning in general
terms, a variety models are used to learn patterns in
data and make accurate predictions based on the
patterns it observes.
 It is use for security purpose.
Any Questions ????
THANK YOU

Potrebbero piacerti anche