Automatic Face Naming by Learning Discriminative Affinity Matrices From Weakly Labeled Images
Automatic Face Naming by Learning Discriminative Affinity Matrices From Weakly Labeled Images
Labeled Images
ABSTRACT
In this paper, we propose two new methods to effectively solve this problem by learning
two discriminative affinity matrices from these weakly labeled images. The System propose a
new method called regularized low-rank representation by effectively utilizing weakly
supervised information to learn a low-rank reconstruction coefficient matrix while exploring
multiple subspace structures of the data. Specifically, by introducing a specially designed
regularizer to the low-rank representation method, we penalize the corresponding reconstruction
coefficients related to the situations where a face is reconstructed by using face images from
other subjects or by using itself. With the inferred reconstruction coefficient matrix, a
discriminative affinity matrix can be obtained. Moreover, we also develop a new distance metric
learning method called ambiguously supervised structural metric learning by using weakly
supervised information to seek a discriminative distance metric. Hence, another discriminative
affinity matrix can be obtained using the similarity matrix (i.e., the kernel matrix) based on the
Mahalanobis distances of the data. Observing that these two affinity matrices contain
complementary information, we further combine them to obtain a fused affinity matrix, based on
which we develop a new iterative scheme to infer the name of each face. Comprehensive
experiments demonstrate the effectiveness of our approach.
1.INTRODUCTION
IN SOCIAL networking websites (e.g., Facebook), photo sharing websites (e.g., Flickr)
and news websites (e.g., BBC), an image that contains multiple faces can be associated with a
caption specifying who is in the picture. For instance, multiple faces may appear in a news photo
with a caption that briefly describes the news. Moreover, in TV serials, movies, and news videos,
the faces may also appear in a video clip with scripts. In the literature, a few methods were
developed for the face naming problem
In this paper, we propose a new scheme for automatic face naming with caption-based
supervision. Specifically, we developtwo methods to respectivelyobtaintwo discriminative
affinity matrices by learning from weakly labeled images. The two affinity matrices are further
fused to generate one fused affinity matrix, based on which an iterative scheme is developed for
automatic face naming.
To obtain the first affinity matrix, we propose a new method called regularized low-rank
representation (rLRR) by incorporatingweakly supervised informationinto the low-rank
representation(LRR) method, so that the affinity matrix can be obtained from the resultant
reconstruction coefficient matrix. To effectively infer the correspondences between the faces
based on visual features and the names in the candidate name sets, we exploit the subspace
structures among faces based on the following assumption: the faces from the same subject/name
lie in the same subspace and the subspaces are linearly independent. Liu et al. [2] showed that
such subspace structures can be effectively recovered using LRR, when the subspaces are
independent and the data sampling rate is sufficient. They also showed that the mined subspace
information is encoded in the reconstruction coefficient matrix that is block-diagonal in the ideal
case. As an intuitive motivation, we implement LRR on a synthetic dataset and the resultant
reconstructioncoefficient matrix is shown in Fig. 2(b) (More details can be found in Sections V-A
and V-C). This near block-diagonal matrix validates our assumption on the subspace structures
among faces. Specifically, the reconstruction coefficients between one face and faces from the
same subject are generally larger than others, indicating that the faces from the same subject tend
to lie in the same subspace [2]. However, due to the significant variances of inthe-wild faces in
poses, illuminations, and expressions, the appearances of faces from different subjects may be
even more similar when compared with those from the same subject. Consequently, as shown in
Fig. 2(b), the faces may also be reconstructed using faces from other subjects. In this paper, we
show that the candidate names from the captions can provide important supervision information
to better discover the subspace structures.
Moreover, we use the similarity matrix (i.e., the kernel matrix) based on the Mahalanobis
distances between the faces as another affinity matrix. Specifically, in Section III-D, we develop
a new distance metric learning method called ambiguously supervised structural metric learning
(ASML) to learn a discriminative Mahalanobis distance metric based on weak supervision
information. In ASML, we consider the constraints for the label matrix of the faces in each image
by using the feasible label set, and we further define the image to assignment (I2A) distance that
measures the incompatibility between a label matrix and the faces from each image based on the
distance metric. Hence, ASML learns a Mahalanobis distance metric that encourages the I2A
distance based on a selected feasible label matrix, which approximates the groundtruth one, to be
smaller than the I2A distances based on infeasible label matrices to some extent. Since rLRR and
ASML explore the weak supervision in different ways and they are both effective, as shown in
our experimental results in Section V, the two corresponding affinity matrices are expected to
contain complementary and discriminative information for face naming. Therefore, to further
improve the performance, we combine the two affinity matrices to obtain a fused affinity matrix
that is used for face naming. Accordingly, we refer to this method as regularized low rank
representation with metric learning (rLRRml for short). Based on the fused affinity matrix, we
additionally propose a new iterative method by formulating the face naming problem as an
integer programming problem with linear constraints, where the constraints are related to the
feasible label set of each image. Our main contributions are summarized as follows. 1) Based on
the caption-based weak supervision, we propose a new method rLRR by introducing a new
regularizer into LRR and we can calculate the first affinity matrix using the resultant
reconstruction coefficient matrix (Section III-C). 2) We also propose a new distance metric
learning approach ASML to learn a discriminative distance metric by effectively coping with the
ambiguous labels of faces. The similarity matrix (i.e., the kernel matrix) based on the
Mahalanobis distances between all faces is used as the second affinity matrix (Section III-D). 3)
With the fused affinity matrix by combining the two affinity matrices from rLRR and ASML, we
propose an efficient scheme to infer the names of faces (Section IV). 4) Comprehensive
experiments are conducted on one synthetic dataset and two real-world datasets, and the results
demonstrate the effectiveness of our approaches (Section V).
2.LITERATURE SURVEY
To tag faces in news photos, Berg et al. [3] proposed to cluster the faces in the news images.
Ozkan and Duygulu [4] developed a graph-based method by constructing the similarity graph of
faces and finding the densest component. Guillaumin et al. [6] proposed the multiple-instance
logistic discriminant metric learning (MildML) method. Luo and Orabona [7] proposed a
structural support vector machine (SVM)-like algorithm called maximum margin set (MMS) to
solve the face naming problem. Recently, Zeng et al. [9] proposed the low-rank SVM (LR-SVM)
approach to deal with this problem, based on the assumption that the feature matrix formed by
faces from the same subject is low rank. In the following, we compare our proposed approaches
with several related existing methods.
Our rLRR method is related to LRR [2] and LR-SVM [9]. LRR is an unsupervised
approach for exploring multiple subspace structures of data. In contrast to LRR, our rLRR
utilizes the weak supervision from image captions and also considers the image-level constraints
when solving the weakly supervised face naming problem. Moreover, our rLRR differs from LR-
SVM [9] in the following two aspects. 1) To utilize the weak supervision, LR-SVM considers
weak supervision information in the partial permutation matrices, while rLRR uses our proposed
regularizer to penalize the corresponding reconstruction coefficients. 2) LR-SVM is based on
robust principal component analysis (RPCA) [14]. Similarly to [15], LR-SVM does not
reconstruct the data by using itself as the dictionary. In contrast, our rLRR is related to the
reconstruction based approach LRR.
Our ASML is also related to two recently proposed approaches for the face naming
problem using weak supervision, MildML [6], and MMS [7]. MildML follows the multi-instance
learning (MIL) assumption, which assumes that each image should contain a face corresponding
to each name in the caption. However, it may not hold for our face naming problem as the
captions are not accurate. In contrast, our ASML employs a maximum margin loss to handle the
structural output without using such an assumption. While MMS also uses a maximum margin
loss to handle the structural output, MMS aims to learn the classifiers and it was designed for the
classification problem. Our ASML learns a distance metric that can be readily used to generate
an affinity matrix and can be combined with the affinity matrix from our rLRR methodto
furtherimprovethe face namingperformance.
SYSTEM ANALYSIS
FEASIBILITY STUDY
Feasibility study is a process which defines exactly what a project is and what strategic issues
need to be considered to assess its feasibility, or likelihood of succeeding. Feasibility studies are
useful both when starting a new business, and identifying a new opportunity for an existing
business. Ideally, the feasibility study process involves making rational decisions about a number
of enduring characteristics of a project, including:
· Technical feasibility- do we’ have the technology’? If not, can we get it?
· Operational feasibility- do we have the resources to build the system? Will the system be
acceptable? Will people use it?
· Economic feasibility, technical feasibility, schedule feasibility, and operational feasibility-
are the benefits greater than the costs?
TECHNICAL FEASIBILITY
Technical feasibility is concerned with the existing computer system (Hardware, Software
etc.) and to what extend it can support the proposed addition. For example, if particular software
will work only in a computer with a higher configuration, an additional hardware is required.
This involves financial considerations and if the budget is a serious constraint, then the proposal
will be considered not feasible.
OPERATIONAL FEASIBILITY
Operational feasibility is a measure of how well a proposed system solves the problems,
and takes advantages of the opportunities identified during scope definition and how it satisfies
the requirements identified in the requirements identified in the requirements analysis phase of
system development.
ECONOMIC FEASIBILITY
Economic analysis is the most frequently used method for evaluating the effectiveness of
a candidate system. More commonly known as cost/ benefit analysis, the procedure is to
determine the benefits and savings that are expected from a candidate system and compare them
with costs. If benefits outweigh costs, then the decision is made to design and implement the
system.
EXISTING SYSTEM
PROPOSED SYSTEM
We propose a new scheme for automatic face naming with caption-based supervision.
Specifically, we develop two methods to respectively obtain two discriminative affinity matrices
by learning from weakly labeled images. The two affinity matrices are further fused to generate
one fused affinity matrix, based on which an iterative scheme is developed for automatic face
naming.
4.SYSTEM SPECIFICATION
Hardware Requirements:
Software Requirements:
SOFTWARE DESCRIPTION
What is .NET?
Many people reckon that it's Microsoft's way of controlling the Internet, which is
false. .NET is Microsoft's strategy of software that provides services to people any time, any
place, on any device. An accurate definition of .NET is, it's an XML Web Services platform
which allows us to build rich .NET applications, which allows users to interact with the Internet
using wide range of smart devices (tablet devices, pocket PC's, web phones etc), which allows to
build and integrate Web Services .
I.
Now that you are familiar with the major goals of the .NET Framework, let's briefly
examine its architecture. As you can see in Figure 1-2, the .NET Framework sits on top of the
operating system, which can be a few different flavors of Windows and consists of a number of
components .NET is essentially a system application that runs on Windows.
Conceptually, the CLR and the JVM are similar in that they are both runtime
infrastructures that abstract the underlying platform differences. However, while the JVM
officially supports only the Java language, the CLR supports any language that can be
represented in itsCommon Intermediate Language (CIL). The JVM executes bytecode, so it can,
in principle, support many languages, too.
Another conceptual difference between the two infrastructures is that Java code runs on
any platform with a JVM, whereas .NET code runs only on platforms that support the CLR. In
April, 2003, the International Organization for Standardization and the International
Electrotechnical Committee (ISO/IEC) recognized a functional subset of the CLR, known as the
Common Language Interface (CLI), as an international standard.
This development, initiated by Microsoft and developed by ECMA International, a
European standards organization, opens the way for third parties to implement their own versions
of the CLR on other platforms.
The layer on top of the CLR is a set of framework base classes. This set of classes is
similar to the set of classes found in STL, MFC, ATL, or Java. These classes support
rudimentary input and output functionality, string manipulation, security management, network
communications, thread management, text management, reflection functionality, collections
functionality, as well as other functions.
On top of the framework base classes is a set of classes that extend the base classes to
support data management and XML manipulation. These classes, called ADO.NET, support
persistent data management—data that is stored on backend databases. Alongside the data
classes, the .NET Framework supports a number of classes to let you manipulate XML data and
perform XML searching and XML translations.
Classes in three different technologies (including web services, Web Forms, and
Windows Forms) extend the framework base classes and the data and XML classes. Web
services include a number of classes that support the development of lightweight distributed
components, which work even in the face of firewalls and NAT software. These components
support plug-and-play across the Internet, because web services employ standard HTTP and
SOAP.
Web Forms, the key technology behind ASP.NET, include a number of classes that allow
you to rapidly develop webGraphical User Interface (GUI) applications. If you're currently
developing web applications with Visual Interdev, you can think of Web Forms as a facility that
allows you to develop web GUIs.
Windows Forms support a set of classes that allow you to develop nativeWindows GUI
applications. You can think of these classes collectively as a much better version of the MFC in
C++ because they support easier and more powerful GUI development and provide a common,
consistent interface that can be used in all languages.
Features OF. Net
Microsoft .NET is a set of Microsoft software technologies for rapidly building
and integrating XML Web services, Microsoft Windows-based applications, and Web solutions.
The .NET Framework is a language-neutral platform for writing programs that can easily and
securely interoperate. There’s no language barrier with .NET: there are numerous languages
available to the developer including Managed C++, C#, Visual Basic and Java Script. The .NET
framework provides the foundation for components to interact seamlessly, whether locally or
remotely on different platforms. It standardizes common data types and communications
protocols so that components created in different languages can easily interoperate.
“.NET” is also the collective name given to various software components built
upon the .NET platform. These will be both products (Visual Studio.NET and Windows.NET
Server, for instance) and services (like Passport, .NET My Services, and so on).
At the heart of the .NET Framework is the common language runtime. The common
language runtime is responsible for providing the execution environment that code written in
a .NET language runs under.
The common language runtime can be compared to the Visual Basic 6 runtime, except that
the common language runtime is designed to handle all .NET languages, not just one, as the
Visual Basic 6 runtime did for Visual Basic 6. The following list describes some of the benefits
the common language runtime gives you:
· Automatic memory management
· Cross-language debugging
· Cross-language exception handling
· Full support for component versioning
· Access to legacy COM components
· XCOPY deployment
· Robust security model
You might expect all those features, but this has never been possible using Microsoft
development tools.Since the initial announcement of the .NET Framework, it's taken on many
new and different meanings to different people. To a developer, .NET means a great
environment for creating robust distributed applications.
To an IT manager, .NET means simpler deployment of applications to end users, tighter
security, and simpler management. To a CTO or CIO, .NET means happier developers using
state-of-the-art development technologies and a smaller bottom line.
To understand why all these statements are true, you need to get a grip on what the .NET
Framework consists of, and how it's truly a revolutionary step forward for application
architecture, development, and deployment.
The second most. But to write the code, you need a foundation of available classes to
access the resources of the operating system, database server, or file server. The FCL is made up
of a hierarchy of namespaces that expose classes, structures, interfaces, enumerations, and
delegates that give you access to these resources. The namespaces are logically defined by
functionality. For example, the System.Data namespace contains all the functionality
available to accessing databases. This namespace is further broken down into
System.Data.SqlClient, which exposes functionality specific to SQL Server, and
System.Data.OleDb, which exposes specific functionality for accessing OLEDB data
sources. The bounds of a namespace aren't necessarily defined by specific assemblies within the
FCL; rather, they're focused on functionality and logical grouping. In total, there are more than
20,000 classes in the FCL, all logically grouped in a hierarchical manner. Figure 1.8 shows
where the FCL fits into the .NET Framework and the logical grouping of namespaces.
To use an FCL class in your application, you use theImports statement in Visual
Basic .NET or theusing statement in C#. When you reference a namespace in Visual
Basic .NET or C#, you also get the convenience of auto-complete and auto-list members when
you access the objects' types using Visual Studio .NET. This makes it very easy to determine
what types are available for each class in the namespace you're using. As you'll see over the next
several weeks, it's very easy to start coding in Visual Studio .NET.
To understand how the common language runtime manages code execution, you must
examine the structure of a .NET application. The primary unit of a .NET application is the
assembly. An assembly is a self-describing collection of code, resources, and metadata. The
assembly manifest contains information about what is contained within the assembly. The
assembly manifest provides:
Each assembly has one and only one assembly manifest, and it contains all the description
information for the assembly. However, the assembly manifest can be contained in its own file or
within one of the assembly’s modules. An assembly contains one or more modules. A module
contains the code that makes up your application or library, and it contains metadata that
describes that code. When you compile a project into an assembly, your code is converted from
high-level code to IL. Because all managed code is first converted to IL code, applications
written in different languages can easily interact. For example, one developer might write an
application in Visual C# that accesses a DLL in Visual Basic .NET. Both resources will be
converted to IL modules before being executed, thus avoiding any language-incompatibility
issues.
To understand how the common language runtime manages code execution, you must
examine the structure of a .NET application. The primary unit of a .NET application is the
assembly. An assembly is a self-describing collection of code, resources, and metadata. The
assembly manifest contains information about what is contained within the assembly. The
assembly manifest provides:
Each assembly has one and only one assembly manifest, and it contains all the description
information for the assembly. However, the assembly manifest can be contained in its own file or
within one of the assembly’s modules.
An assembly contains one or more modules. A module contains the code that makes up
your application or library, and it contains metadata that describes that code. When you compile
a project into an assembly, your code is converted from high-level code to IL. Because all
managed code is first converted to IL code, applications written in different languages can easily
interact. For example, one developer might write an application in Visual C# that accesses a
DLL in Visual Basic .NET. Both resources will be converted to IL modules before being
executed, thus avoiding any language-incompatibility issues.
Each module also contains a number of types. Types are templates that describe a set of
data encapsulation and functionality. There are two kinds of types: reference types (classes) and
value types (structures). These types are discussed in greater detail in Lesson 2 of this chapter.
Each type is described to the common language runtime in the assembly manifest. A type can
contain fields, properties, and methods, each of which should be related to a common
functionality.
For example, you might have a class that represents a bank account. It contains fields,
properties, and methods related to the functions needed to implement a bank account. A field
represents storage of a particular type of data. One field might store the name of an account
holder, for example. Properties are similar to fields, but properties usually provide some kind of
validation when data is set or retrieved. You might have a property that represents an account
balance.
When an attempt is made to change the value, the property can check to see if the
attempted change is greater than a predetermined limit. If the value is greater than the limit, the
property does not allow the change. Methods represent behavior, such as actions taken on data
stored within the class or changes to the user interface. Continuing with the bank account
example, you might have a Transfer method that transfers a balance from a checking account to a
savings account, or an Alert method that warns users when their balances fall below a
predetermined level.
When you compile a .NET application, it is not compiled to binary machine code; rather,
it is converted to IL. This is the form that your deployed application takes—one or more
assemblies consisting of executable files and DLL files in IL form. At least one of these
assemblies will contain an executable file that has been designated as the entry point for the
application.
When execution of your program begins, the first assembly is loaded into memory. At
this point, the common language runtime examines the assembly manifest and determines the
requirements to run the program. It examines security permissions requested by the assembly and
compares them with the system’s security policy. If the system’s security policy does not allow
the requested permissions, the application will not run. If the application passes the system’s
security policy, the common language runtime executes the code. It creates a process for the
application to run in and begins application execution.
When execution starts, the first bit of code that needs to be executed is loaded into
memory and compiled into native binary code from IL by the common language runtime’s Just-
In-Time (JIT) compiler. Once compiled, the code is executed and stored in memory as native
code. Thus, each portion of code is compiled only once when an application executes. Whenever
program execution branches to code that has not yet run, the JIT compiler compiles it ahead of
execution and stores it in memory as binary code. This way, application performance is
maximized because only the parts of a program that are executed are compiled.
The .NET Framework base class library contains the base classes that provide many of
the services and objects you need when writing your applications. The class library is organized
into namespaces. A namespace is a logical grouping of types that perform related functions. For
example, the System .Windows Forms namespace contains all the types that make up Windows
forms and the controls used in those forms.
Namespaces are logical groupings of related classes. The namespaces in the .NET base
class library are organized hierarchically. The root of the .NET Framework is the System
namespace. Other namespaces can be accessed with the period operator. A typical namespace
construction appears as follows:
System
System.Data
System.Data.SQLClient
The first example refers to the System namespace. The second refers to the System.Data
namespace. The third example refers to the System.Data.SQLClient namespace.
Table -introduces some of the more commonly used .NET base class namespaces.
Namespace Description
This namespace is the root for many of the low-level types required by
the .NET Framework. It is the root for primitive data types as well, and
System
it is the root for all the other namespaces in the .NET base class
library.
This namespace contains a set of classes that are shared by the .NET
System.Data.Common
managed data providers.
This namespace contains classes that are optimized for interacting with
System.Data.SQLClient
Microsoft SQL Server.
This namespace exposes GDI+ functionality and provides classes that
System.Drawing
facilitate graphics rendering.
System.IO In this namespace, you will find types for handling file system I/O.
Programming in the .NET Framework environment is done with objects. Objects are
programmatic constructs that represent packages of related data and functionality. Objects are
self-contained and expose specific functionality to the rest of the application environment
without detailing the inner workings of the object itself. Objects are created from a template
called a class. The .NET base class library provides a set of classes from which you can create
objects in your applications.
Objects, Members, and Abstraction
Data access in ADO.NET relies on two entities: the DataSet, which stores data on the
local machine, and the Data Provider, a set of components that mediates interaction between the
program and the database.
The Dataset
The DataSet object contains a collection of zero or more DataTable objects, each of
which is an in-memory representation of a single table. The structure of a particular DataTable is
defined by the DataColumns collection, which enumerates the columns in a particular table, and
the Constraint collection, which enumerates any constraints on the table. Together, these two
collections make up the table schema. A DataTable also contains a DataRows collection, which
contains the actual data in the DataSet.
The DataSet contains a DataRelations collection. A DataRelation object allows you to
create associations between rows in one table and rows in another table. The DataRelations
collection enumerates a set of DataRelation objects that define the relationships between tables
in the DataSet. For example, consider a DataSet that contains two related tables: an Employees
table and a Projects table. In the Employees table, each employee is represented only once and is
identified by a unique EmployeeID field. In the Projects table, an employee in charge of a project
is identified by the EmployeeID field, but can appear more than once if that employee is in
charge of multiple projects. This is an example of a one-to-many relationship; you would use a
DataRelation object to define this relationship.Additionally, a DataSet contains an
ExtendedProperties collection, which is used to store custom information about the DataSet
The link to the database is created and maintained by a data provider. A data provider is not a
single component, rather it is a set of related components that work together to provide data in an
efficient, performance-driven manner. The first version of the Microsoft .NET Framework
shipped with two data providers: the SQL Server .NET Data Provider, designed specifically to
work with SQL Server 7 or later, and the OleDb .NET Data Provider, which connects with other
types of databases. Microsoft Visual Studio .NET 2003 added two more data providers: the
ODBC Data Provider and the Oracle Data Provider. Each data provider consists of versions of
the following generic component classes:
· The Data Adapter object populates a disconnected DataSet or DataTable with data and
performs updates.
Data access in ADO.NET is facilitated as follows: a Connection object establishes a
connection between the application and the database. This connection can be accessed directly
by a Command object or by a DataAdapter object.
The Command object provides direct execution of a command to the database. If the
command returns more than a single value, the Command object returns a DataReader to provide
the data. This data can be directly processed by application logic. Alternatively, you can use the
DataAdapter to fill a DataSet object. Updates to the database can be achieved through the
Command object or through the DataAdapter.The generic classes that make up the data providers
are summarized in the following sections.
REPORT:
A report is used to vies and print information from the database. The report can ground
records into many levels and compute totals and average by checking values from many
records at once. Also the report is attractive and distinctive because we have control over the
size and appearance of it.
MACRO:
A macro is a set of actions. Each action in macros does something. Such as opening a form or
printing a report .We write macros to automate the common tasks the work easy and save the
time.
History:-
In 1996, Sun Microsystems released the Java programming language with Microsoft soon
purchasing a license to implement it in their operating system. Java was originally meant to be a
platform independent language, but Microsoft, in their implementation, broke their license
agreement and made a few changes that would essentially inhibit Java's platform-independent
capabilities. Sun filed a lawsuit and Microsoft settled, deciding to create their own version of a
partially compiled, partially interpreted object-oriented programming language with syntax
closely related to that of C++.
During the development of .NET, the class libraries were originally written in a
language/compiler called Simple Managed C (SMC). In January 1999, Anders Hejlsberg formed
a team to build a new language at the time called Cool, which stood for "C like Object Oriented
Language".Microsoft had considered keeping the name "Cool" as the final name of the language,
but chose not to do so for trademark reasons. By the time the .NET project was publicly
announced at the July 2000 Professional DevelopersConference, the language had been renamed
C#, and the class libraries and ASP.NET runtime had been ported to C#.
C#'s principal designer and lead architect at Microsoft is Anders Hejlsberg, who was previously
involved with the design of Visual J++, BorlandDelphi, and Turbo Pascal. In interviews and
technical papers he has stated that flaws in most major programming languages (e.g. C++, Java,
Delphi, and Smalltalk) drove the fundamentals of the Common Language Runtime (CLR),
which, in turn, drove the design of the C# programming language itself. Some argue that C#
shares roots in other languages.
Features of C#:-
By design, C# is the programming language that most directly reflects the underlying Common
Language Infrastructure (CLI). Most of C#'s intrinsic types correspond to value-types
implemented by the CLI framework. However, the C# language specification does not state the
code generation requirements of the compiler: that is, it does not state that a C# compiler must
target a Common Language Runtime (CLR), or generate Common Intermediate Language (CIL),
or generate any other specific format. Theoretically, a C# compiler could generate machine code
like traditional compilers of C++ or FORTRAN; in practice, all existing C# implementations
target CIL.
· There are no global variables or functions. All methods and members must be declared
within classes. It is possible, however, to use static methods/variables within public
classes instead of global variables/functions.
· Local variables cannot shadow variables of the enclosing block, unlike C and C++.
Variable shadowing is often considered confusing by C++ texts.
· C# supports a strict Boolean data type, bool. Statements that take conditions, such as
while and if, require an expression of a Boolean type. While C++ also has a Boolean
type, it can be freely converted to and from integers, and expressions such as if(a)
require only that a is convertible to bool, allowing a to be an int, or a pointer. C#
disallows this "integer meaning true or false" approach on the grounds that forcing
programmers to use expressions that return exactly bool can prevent certain types of
programming mistakes such as if (a = b) (use of = instead of ==).
· In C#, memory address pointers can only be used within blocks specifically marked as
unsafe, and pro
grams with unsafe code need appropriate permissions to run. Most object access is done
through safe object references, which are always either pointing to a valid, existing
object, or have the well-defined null value; a reference to a garbage-collected object, or to
random block of memory, is impossible to obtain. An unsafe pointer can point to an
instance of a value-type, array, string, or a block of memory allocated on a stack. Code
that is not marked as unsafe can still store and manipulate pointers through the
System.IntPtr type, but cannot dereference them.
· Multiple inheritance is not supported, although a class can implement any number of
interfaces. This was a design decision by the language's lead architect to avoid
complication, avoid dependency hell and simplify architectural requirements throughout
CLI.
· C# is more type safe than C++. The only implicit conversions by default are those which
are considered safe, such as widening of integers and conversion from a derived type to a
base type. This is enforced at compile-time, during JIT, and, in some cases, at runtime.
There are no implicit conversions between Booleans and integers, nor between
enumeration members and integers (except for literal 0, which can be implicitly
converted to any enumerated type). Any user-defined conversion must be explicitly
marked as explicit or implicit, unlike C++ copy constructors (which are implicit by
default) and conversion operators (which are always implicit).
· C# provides syntactic sugar for a common pattern of a pair of methods, accessor (getter)
and mutator (setter) encapsulating operations on a single attribute of a class, in form of
properties.
C# has a unified type system. This unified type system is called Common Type System (CTS).
A unified type system implies that all types, including primitives such as integers, are subclasses
of the System. Object class. For example, every type inherits a To String () method.
For performance reasons, primitive types (and value types in general) are internally allocated on
the stack.
· Value types
· Reference types
Value types are plain aggregations of data. Instances of value types do not have referential
identity or referential comparison semantics - equality and inequality comparisons for value
types compare the actual data values within the instances, unless the corresponding operators are
overloaded. Value types are derived from System.ValueType, always have a default value,
and can always be created and copied. Some other limitations on value types are that they cannot
derive from each other (but can implement interfaces) and cannot have a default (parameter less)
constructor. Examples of value types are some primitive types, such as int (a signed 32-bit
integer), float (a 32-bit IEEE floating-point number), char (a 16-bit Unicode code point),
and System.DateTime (identifies a specific point in time with millisecond precision).
In contrast, reference types have the notion of referential identity - each instance of reference
type is inherently distinct from every other instance, even if the data within both instances is the
same. This is reflected in default equality and inequality comparisons for reference types, which
test for referential rather than structural equality, unless the corresponding operators are
overloaded (such as the case for System. String). In general, it is not always possible to
create an instance of a reference type, nor to copy an existing instance, or perform a value
comparison on two existing instances, though specific reference types can provide such services
by exposing a public constructor or implementing a corresponding interface (such as
ICloneable or I Comparable). Examples of reference types are object (the ultimate
base class for all other C# classes), System. String (a string of Unicode characters), and
System. Array (a base class for all C# arrays).
ACCESS PRIVIEGES
IIS provides several new access levels. The following values can set the type of access
allowed to specific directories:
· Read
· Write
· Script
· Execute
· Log Access
· Directory Browsing.
ActiveX
ActiveX application, called controls, are downloaded and executed by the Web
browser, like Java applets. Unlike Java applets, controls can be installed permanently when they
are downloaded; eliminating the need to download them again. ActiveX’s main advantage is that
it can do just about anything.
Several enterprising programmers have already used ActiveX to bring exciting new
capabilities to Web page, such as “the Web page that turns off your computer” and “the Web
page that formats disk drive”.
Fortunately, ActiveX includes a signature feature that identifies the source of the control
and prevents controls from being modified. While this won’t prevent a control from damaging
system, we can specify which sources of controls we trust.
ActiveX is proprietary.
ADO.NET
ADO.NET provides consistent access to data sources such as Microsoft SQL Server, as
well as data sources exposed via OLE DB and XML. Data-sharing consumer applications can
use ADO.NET to connect to these data sources and retrieve, manipulate, and update data.
ADO.NET cleanly factors data access from data manipulation into discrete components
that can be used separately or in tandem. ADO.NET includes .NET data providers for connecting
to a database, executing commands, and retrieving results. Those results are either processed
directly, or placed in an ADO.NET Dataset object in order to be exposed to the user in an ad-hoc
manner, combined with data from multiple sources, or remote between tiers. The ADO.NET
Dataset object can also be used independently of a .NET data provider to manage data local to
the application or sourced from XML.
Why ADO.NET?
As application development has evolved, new applications have become loosely coupled
based on the Web application model. More and more of today's applications use XML to encode
data to be passed over network connections. Web applications use HTTP as the fabric for
communication between tiers, and therefore must explicitly handle maintaining state between
requests. This new model is very different from the connected, tightly coupled style of
programming that characterized the client/server era, where a connection was held open for the
duration of the program's lifetime and no special handling of state was required.
In designing tools and technologies to meet the needs of today's developer, Microsoft
recognized that an entirely new programming model for data access was needed, one that is built
upon the .NET Framework. Building on the .NET Framework ensured that the data access
technology would be uniform—components would share a common type system, design
patterns, and naming conventions.
ADO.NET was designed to meet the needs of this new programming model:
disconnected data architecture, tight integration with XML, common data representation with the
ability to combine data from multiple and varied data sources, and optimized facilities for
interacting with a database, all native to the .NET Framework.
ADO.NET coexists with ADO. While most new .NET applications will be written using
ADO.NET, ADO remains available to the .NET programmer through .NET COM
interoperability services. For more information about the similarities and the differences between
ADO.NET and ADO.
XML Support
XML and data access are intimately tied—XML is all about encoding data, and data access is
increasingly becoming all about XML. The .NET Framework does not just support Web
standards—it is built entirely on top of them.
5.SYSTEM DESIGN:-
Architecture diagram
DFD:
LEVEL 0:
LEVEL 1:
LEVEL 2:
UML DIAGRAMS:
CLASS DIAGRAM:
USECASE DIAGRAM:
SEQUENCE DIAGRAM:
ACTIVITY DIAGRAM:
COLLABORATION DIAGRAM:
6. IMPLEMENTATION
MODULE DESCRIPTION
NORMALIZATION
Normalization is the process of breaking down a table into smaller tables. So that each
table deals with a single theme. There are three different kinds of modifications of anomalies and
formulated the first, second and third normal forms (3NF) is considered sufficient for most
practical purposes. It should be considered only after a thorough analysis and complete
understanding of its implications.
This form also called as a “flat file”. Each column should contain data in respect of a
single attributes and no two rows may be identical. To bring a table to First Normal Form,
repeating groups of fields should be identified and moved to another table.
Third Normal Form normalization will be needed where all attributes in a relation tuple are not
functionally dependent only on the key attribute. A transitive dependency is one in which one in
which one attribute depends on second which is turned depends on a third and so on.
7.SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub assemblies, assemblies and/or a finished product It is the
process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a specific testing
requirement.
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and expected results.
Integration testing
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components is
correct and consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components.
Functional test
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
System Test
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points
White Box Testing is a testing in which in which the software tester has knowledge of the inner
workings, structure and language of the software, or at least its purpose. It is purpose. It is used
to test areas that cannot be reached from a black box level.
Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests,
must be written from a definitive source document, such as specification or requirements
document, such as specification or requirements document. It is a testing in which the software
under test is treated, as a black box .you cannot “see” into it. The test provides inputs and
responds to outputs without considering how the software works.
Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.
Field testing will be performed manually and functional tests will be written in detail.
Test objectives
· All field entries must work properly.
· Pages must be activated from the identified link.
· The entry screen, messages and responses must not be delayed.
Features to be tested
· Verify that the entries are of the correct format
· No duplicate entries should be allowed
· All links should take the user to the correct page.
The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level –
interact without error.
Test Results: All the test cases mentioned above passed successfully. No defects encountered.
User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.
Test Results: All the test cases mentioned above passed successfully. No defects encountered.
Pseudocode
· Compare the resulting output with the desired output for the given input. This is called
the error.
· Modify the weights for all neurons using the error USING BP.
· Repeat the process until the error reaches an acceptable value (e.g. error < 1%), which
means that the NN was trained successfully, or if we reach a maximum count of
iterations, which means that the NN training was not successful.
Skin color detection
the human skin color has a restricted range of hues and is not deeply saturated, since the
appearance of skin is formed by a combination of blood (red) and melanin (brown,
yellow). Therefore, the human skin color does not fall randomly in a given color space,
but clustered at a small area in the color space. But it is not the same for all the color
spaces. Variety of color spaces have been used in skin detection literature with the aim of
finding a color space where the skin color is invariant to illumination conditions. The
choice of the color spaces affects the shape of the skin class, which affects the detection
process. Here, some color spaces, which are typically used in skin detection, are briefly
described, and the way they affect the skin detection is discussed.
Algorithm 1. BorderLength(C)
The second quality measure, Border Edges (BE) does not use the border length itself but the
edge response (obtained by an edge detector) across the borders. The idea of this measure is a
good clustering should separate objects in an image, and at such borders between object we
usually observe the strongest edge response. Higher values denote a better clustering quality. The
pseudo code is shown in Algorithm 2.
Algorithm 2. BorderEdges(C,E)
The third quality measure, Color Space Compactness (CSC) operates in color space, and tests the
proximity of all pixels to the corresponding cluster center using the Mahalanobis distance. The
matrix for the Mahalanobis distance is computed.
Algorithm 3. ColorSpaceCompactness(I,C,μi,Σi
The three measures, of course, can also be combined into a single measure, e.g. by a weighted
sum of the individual measures.
Results /finding
The developed project was tested with the dell laptop with 2 MP
camera and which gives the promising output even for the user who is in the
distance about 10 feet as well as even though the face of the person appears
too small because he is standing away from camera this project is able to
detect his face and retrieve his name accurately with minimum delay.
Conclusion and feature scope
A new scheme for face naming with caption-based supervision, in which one image that may
contain multiple faces is associated with a caption specifying only who is in the image. To
effectively utilize the caption-based weak supervision, we propose an LRR based method, called
rLRR by introducing a new regularizer to utilize such weak supervision information. We also
develop a new distance metric learning method ASML using weak supervision information to
seek a discriminant Mahalanobis distance metric. Two affinity matrices can be obtained from
rLRR and ASML, respectively. Moreover, we further fuse the two affinity matrices and
additionally propose an iterative scheme for face naming based on the fused affinity matrix. The
experiments conducted on a synthetic dataset clearly demonstrate the effectiveness of the new
regularizer in rLRR. In the experiments on two challenging real-world datasets (i.e., the Soccer
player dataset and the Labeled Yahoo! News dataset), our rLRR outperforms LRR, and our
ASML is better than the existing distance metric learning method MildML. Moreover, our
proposed rLRRml outperforms rLRR and ASML, as well as several state-of-the-art baseline
algorithms. To further improve the face naming performances, we plan to extend our rLRR in the
future by additionally incorporating the _1-norm-based regularizer and using other losses when
designing new regularizes. We will also study how to automatically determine the optimal
parameters for our methods in the future.
9.REFERENCES
[1] P. Viola and M. J. Jones, “Robust real-time face detection,” Int. J. Comput. Vis., vol. 57, no.
2, pp. 137–154, 2004.
[2] G. Liu, Z. Lin, and Y. Yu, “Robust subspace segmentation by low-rank representation,” in
Proc. 27th Int. Conf. Mach. Learn., Haifa, Israel, Jun. 2010, pp. 663–670.
[3] T. L. Berget al., “Names and faces in the news,” in Proc. 17th IEEE Comput. Soc. Conf.
Comput. Vis. Pattern Recognit., Washington, DC, USA, Jun./Jul. 2004, pp. II-848–II-854.
[4] D. Ozkan and P. Duygulu, “A graph based approach for naming faces in news photos,” in
Proc. 19th IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., New York, NY, USA, Jun.
2006, pp. 1477–1482. [5] P. T. Pham, M. Moens, and T. Tuytelaars, “Cross-media alignment of
names and faces,” IEEE Trans. Multimedia, vol. 12, no. 1, pp. 13–27, Jan. 2010.
[6] M. Guillaumin, J. Verbeek, and C. Schmid, “Multiple instance metric learning from
automatically labeled bags of faces,” in Proc. 11th Eur. Conf. Comput. Vis., Heraklion, Crete,
Sep. 2010, pp. 634–647.
[7] J. Luo and F. Orabona, “Learning from candidate labeling sets,” in Proc. 23rd Annu. Conf.
Adv. Neural Inf. Process. Syst., Vancouver, BC, Canada, Dec. 2010, pp. 1504–1512.
[8] X. Zhang, L. Zhang, X.-J. Wang, and H.-Y. Shum, “Finding celebrities in billions of web
images,” IEEE Trans. Multimedia, vol. 14, no. 4, pp. 995–1007, Aug. 2012.
[9] Z. Zeng et al., “Learning by associating ambiguously labeled images,” in Proc. 26th IEEE
Conf. Comput. Vis. Pattern Recognit., Portland, OR, USA, Jun. 2013, pp. 708–715. [10] M.
Everingham, J. Sivic, and A. Zisserman, “Hello! My name is... Buffy—Automatic naming of
characters in TV video,” in Proc. 17th Brit. Mach. Vis. Conf., Edinburgh, U.K., Sep. 2006, pp.
899–908. [11] J. Sang and C. Xu, “Robust face-name graph matching for movie character
identification,” IEEE Trans. Multimedia, vol. 14, no. 3, pp. 586–596, Jun. 2012.
[12] Y.-F. Zhang, C. Xu, H. Lu, and Y.-M. Huang, “Character identification in feature-length
films using global face-name matching,” IEEE Trans. Multimedia, vol. 11, no. 7, pp. 1276–1288,
Nov. 2009.
[13] M. Tapaswi, M. Bäuml, and R. Stiefelhagen, “‘Knock! Knock! Who is it?’ Probabilistic
person identification in TV series,” in Proc. 25th IEEE Conf. Comput. Vis. Pattern Recognit.,
Providence, RI, USA, Jun. 2012, pp. 2658–2665.
[14] E. J. Candès, X. Li, Y. Ma, and J. Wright, “Robust principal component analysis?” J. ACM,
vol. 58, no. 3, pp. 1–37, 2011, Art. ID 11. [15] Y. Deng, Q. Dai, R. Liu, Z. Zhang, and S. Hu,
“Low-rank structure learning via nonconvex heuristic recovery,” IEEE Trans. Neural Netw.
Learn. Syst., vol. 24, no. 3, pp. 383–396, Mar. 2013.
[16] K. Q. Weinberger and L. K. Saul, “Distance metric learning for large margin nearest
neighbor classification,” J. Mach. Learn. Res., vol. 10, pp. 207–244, Feb. 2009.
[17] C. Shen, J. Kim, and L. Wang, “A scalable dual approach to semidefinite metric learning,”
in Proc. 24th IEEE Conf. Comput. Vis. Pattern Recognit., Colorado Springs, CO, USA, Jun.
2011, pp. 2601–2608.
[18] B. McFee and G. Lanckriet, “Metric learning to rank,” in Proc. 27th Int. Conf. Mach.
Learn., Haifa, Israel, Jun. 2010, pp. 775–782.
[19] S. Andrews, I. Tsochantaridis, and T. Hofmann, “Support vector machines for multiple-
instance learning,” in Proc. 16th Annu. Conf. Neural Inf. Process. Syst., Vancouver, BC, Canada,
Dec. 2003, pp. 65–72.
[20] M.-L. Zhang and Z.-H. Zhou, “M3MIML: A maximum margin method for multi-instance
multi-label learning,” in Proc. 8th IEEE Int. Conf. Data Mining, Pisa, Italy, Dec. 2008, pp. 688–
697.
[21] T. Cour, B. Sapp, C. Jordan, and B. Taskar, “Learning from ambiguously labeled images,”
in Proc. 22nd IEEE Conf. Comput. Vis. Pattern Recognit., Miami, FL, USA, Jun. 2009, pp. 919–
926.
[22] E. Elhamifar and R. Vidal, “Sparse subspace clustering,” in Proc. 22nd IEEE Conf.
Comput. Vis. Pattern Recognit., Miami, FL, USA, Jun. 2009, pp. 2790–2797.
[23] C. Lu, J. Feng, Z. Lin, and S. Yan, “Correlation adaptive subspace segmentation by trace
Lasso,” in Proc. 12th IEEE Int. Conf. Comput. Vis., Sydney, VIC, Australia, Dec. 2013, pp.
1345–1352.
[24] S. Xiao, M. Tan, and D. Xu, “Weighted block-sparse low rank representation for face
clustering in videos,” in Proc. 13th Eur. Conf. Comput. Vis., Zürich, Switzerland, Sep. 2014, pp.
123–138.
[25] Z. Lin, R. Liu, and Z. Su, “Linearized alternating direction method with adaptive penalty
for low-rank representation,” in Proc. 24th Annu. Conf. Neural Inf. Process. Syst., Granada,
Spain, Dec. 2011, pp. 612–620.
[26] J.-F. Cai, E. J. Candès, and Z. Shen, “A singular value thresholding algorithm for matrix
completion,” SIAM J. Optim., vol. 20, no. 4, pp. 1956–1982, 2010.
[27] J. Yang, W. Yin, Y. Zhang, and Y. Wang, “A fast algorithm for edgepreserving variational
multichannel image restoration,” SIAM J. Imag. Sci., vol. 2, no. 2, pp. 569–592, 2009.
[28] C. Shen, J. Kim, and L. Wang, “Scalable large-margin Mahalanobis distance metric
learning,” IEEE Trans. Neural Netw., vol. 21, no. 9, pp. 1524–1530, Sep. 2010.
[29] A. L. Yuille and A. Rangarajan, “The concave-convex procedure,” Neural Comput., vol. 15,
no. 4, pp. 915–936, 2003.
[30] S. Shalev-Shwartz, Y. Singer, N. Srebro, and A. Cotter, “Pegasos: Primal estimated sub-
gradient solver for SVM,” Math. Program.,vol. 127, no. 1, pp. 3–30, 2011.
[31] K. Q. Weinberger and L. K. Saul, “Fast solvers and efficient implementations for distance
metric learning,” in Proc. 25th IEEE Int. Conf. Mach. Learn., Helsinki, Finland, Jun. 2008, pp.
1160–1167.
[32] M. Guillaumin, T. Mensink, J. Verbeek, and C. Schmid, “Face recognition from caption-
based supervision,” Int. J. Comput. Vis., vol. 96, no. 1, pp. 64–82, 2012.
Login page
Registration
Login process
Home form
Detecting Face
Training face
Face identification and caption assignment