Accord.NET is an extension to AForge.NET, a popular C# framework for computer vision and machine learning. Currently, Accord.NET provides many statistical analysis and processing functions, as well as still experimental sound analysis package.
This guide is intended to show new users how to install the Accord.NET and AForge.NET Frameworks and show how to create a simple application making use of both frameworks.
Contents
|
Being an extension, the Accord.NET Framework requires AForge.NET to be already installed in your system. Each release of the Accord.NET Framework is always built against one particular version of the AForge.NET Framework, and compatibility is guaranteed only with this particular release. The matching version number for this particular release of AForge.NET will always be included in the release notes for a given Accord.NET release. Please note that, despite being built only against one particular version, newer releases than those indicated in the release notes may also work - albeit such scenarios will not be officially supported.
Framework releases for Accord.NET are available in the download section, with newest releases always on the top of the page. To download the framework, click one of the entries and proceed to the Release Details page.
Once a release has been selected, a page containing the release notes and links to the downloadable files will be shown on screen. Please be aware that the recommended version of AForge.NET Framework which should be used with any particular release of Accord.NET will always be available at the bottom of the release notes.
In any particular release there will be at least three download options:
Most users would want to download the executable installer, since it provides the easiest way to install the Accord.NET binaries, source code and documentation. The compressed files would be of interest for Linux users willing to run the framework on Mono.
The following instructions will assume the user has downloaded the executable installer. After the executable installer has finished downloading, please double-click it to start the setup process.
The official site for the AForge.NET Framework is located at http://www.aforgenet.com, though its official repository is hosted at Google Code on http://aforge.googlecode.com. Its main download page is located on http://code.google.com/p/aforge/downloads/list.
As mentioned before, each release of the Accord.NET Framework is built against one particular version of the AForge.NET Framework. Though this is a recommendation, not a requirement, ensuring we are installing the correct version of AForge.NET may reduce further incompatibilities that may arise in the future. When issuing new bug reports it is absolutely required to be using compatible versions.
Once we have determined the recommended version of AForge.NET from Accord.NET's release notes, we can proceed and download this particular release from the AForge.NET Framework's download page.
After double-clicking the installer, a setup wizard will pop-in to guide the installation process. The installation procedure is very straightforward. After accepting the user's license agreement, it will be possible to customize the installation by selecting which modules should be installed.
The installer components include the mandatory Accord.NET libraries, the documentation, the source code and the sample applications.
After the setup is properly configured, the installation will start copying files to your computer. By default, all files will be installed under C:\Program Files\Accord.NET
The framework's assemblies will be automatically registered to be available under Visual Studio's Add Reference Dialog but will not be registered at the GAC. If desired, you may manually compile the binaries with ngen for further speedups.
There are no special requirements on the installation of the AForge.NET Framework besides using the recommended version. Installation can proceed as usual, and all settings can be left on default or configured as desired. For more details on installing AForge.NET, please refer to the official AForge.NET site.
After both frameworks have been installed, Accord.NET will be ready to be used. The framework's documentation will be available in the Start Menu in the form of a Microsoft's Compiled HTML Help file.
If included documentation is not enough, please take a look on the sample applications accompanying the framework. Most questions related to framework usage can be answered by taking a quick look on how the sample applications instantiate portions of the framework to accomplish their work.
If you further questions regarding the Accord.NET Framework, please refer to Accord.NET's forums. If you have questions related to AForge.NET, machine learning, artificial intelligence, imaging or other general topics, please refer to the AForge.NET Forums.
In the following example we will be creating a new application using Accord.NET. The goal of this section is to show how to add references to the Accord.NET and AForge.NET Frameworks and how to obtain on-the-fly documentation through Intellisense.
In this example we will be using Microsoft's Visual Studio 2008 Team Edition. However any decent IDE, or even command line compilers would suffice. Free versions of Visual Studio, named Express Editions, are available on http://www.microsoft.com/express/. The open-source IDE SharpDevelop is also available on http://www.sharpdevelop.net. There is also limited support for MonoDevelop on Linux.
We will start this example by opening up Visual Studio.
After Visual Studio has finished loading, click the File->New Project menu item to start creating a new project.
In the New Project Dialog, select the item "Console Application" under the Visual C# category. Even if we are going to use C# in this example, please keep in mind that Accord.NET supports all .NET compatible languages such as VB.NET or C++/CLI.
At this point we can start adding references to our project. Right-click the project name on the Solution Browser and select "Add References"
We will start by adding references to Accord.NET. Since we are going to develop a sample application which uses Support Vector Machines, we will want to add references to the Accord.MachineLearning, Accord.Statistics, Accord.Math and Accord.Core namespaces.
Since Accord.NET depends on AForge.NET, we have to add references to AForge.NET as well. We will be adding references to AForge.Math and AForge namespaces.
We are now ready to start developing our application. Besides documentation, the project has full Intellisense support to aid in development.
The following code demonstrates how to create and teach a SVM to recognize the classic XOR problem.
Once the application code is finished, we can run it by hitting F5 (or equivalently, clicking on the Start Debugging button) on Visual Studio. The application will train the aforementioned Support Vector Machine and should display the training error obtained after learning. A training error of zero indicates that the machine has learned the problem perfectly.
HMM does anyone have idea about HMM
Dear All I am trying to use HMM in handwriting Recognition , is there any one know about HMM and what kind of input should be is it should be vector , text ... or ?
thanks Mahmood