<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Entrepreneurial Geekiness</title>
	
	<link>http://ianozsvald.com</link>
	<description>My thoughts on screencasting, ProCasts and high-tech entrepreneurship</description>
	<lastBuildDate>Sat, 17 Jul 2010 22:17:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/EntrepreneurialGeekiness" /><feedburner:info uri="entrepreneurialgeekiness" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>EuroPython 2010</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/BwaRYspwldY/</link>
		<comments>http://ianozsvald.com/2010/07/17/europython-2010/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 22:17:08 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Aerodynamics]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Birds]]></category>
		<category><![CDATA[Feather Session]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Hotel Room]]></category>
		<category><![CDATA[Love]]></category>
		<category><![CDATA[Programming Opengl]]></category>
		<category><![CDATA[Pypy]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Sequential Processes]]></category>
		<category><![CDATA[Unladen Swallow]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=1005</guid>
		<description><![CDATA[I&#8217;m hugely looking forward to EuroPython in Birmingham from Monday. I&#8217;m driving up Monday very early (I wish I&#8217;d booked the hotel room for Sunday night too&#8230;). Browsing through the abstracts I&#8217;d say all the following look darned interesting! C++ integration concurrent sequential processes Arduino hacking javascript OpenData aerodynamics PyPy and Unladen Swallow game programming [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m hugely looking forward to <a href="http://www.europython.eu/" onclick="pageTracker._trackPageview('/outgoing/www.europython.eu/?referer=');">EuroPython</a> in Birmingham from Monday. I&#8217;m driving up Monday very early (I wish I&#8217;d booked the hotel room for Sunday night too&#8230;). Browsing through the <a href="http://www.europython.eu/talks/talk_abstracts/" onclick="pageTracker._trackPageview('/outgoing/www.europython.eu/talks/talk_abstracts/?referer=');">abstracts</a> I&#8217;d say all the following look darned interesting!</p>
<ul>
<li>C++ integration</li>
<li>concurrent sequential processes</li>
<li>Arduino hacking</li>
<li>javascript</li>
<li>OpenData</li>
<li>aerodynamics</li>
<li>PyPy and Unladen Swallow</li>
<li>game programming</li>
<li>OpenGL</li>
<li>Pyjamas</li>
<li>idiomatic Python</li>
<li>MediaCore</li>
<li>Twisted and gevent</li>
<li>science and maths</li>
<li>SHOGUN machine learning</li>
</ul>
<p>I&#8217;ll bring <a href="http://blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/?referer=');">Headroid</a> along and I hope to organise a Birds of a Feather session on Artificial Intelligence and robotics. If you&#8217;re interested in these topics, I&#8217;d love to say hi!</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/BwaRYspwldY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/07/17/europython-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/07/17/europython-2010/</feedburner:origLink></item>
		<item>
		<title>22,937* faster Python math using pyCUDA</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/p6rYUljNtQo/</link>
		<comments>http://ianozsvald.com/2010/07/14/22937-faster-python-math-using-pycuda/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 11:52:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Calculation Routine]]></category>
		<category><![CDATA[Cpu Tests]]></category>
		<category><![CDATA[Default Problem]]></category>
		<category><![CDATA[Double Precision]]></category>
		<category><![CDATA[Dual Core]]></category>
		<category><![CDATA[Floating Point Numbers]]></category>
		<category><![CDATA[Gigabyte Ga]]></category>
		<category><![CDATA[Implementations]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Mandelbrot]]></category>
		<category><![CDATA[Numpy Arrays]]></category>
		<category><![CDATA[Nvidia]]></category>
		<category><![CDATA[Nvidia Graphics Card]]></category>
		<category><![CDATA[Precision 2]]></category>
		<category><![CDATA[Psu]]></category>
		<category><![CDATA[Speed Differences]]></category>
		<category><![CDATA[Speed Ups]]></category>
		<category><![CDATA[Top Of The Line]]></category>
		<category><![CDATA[Ups]]></category>
		<category><![CDATA[Variants]]></category>
		<category><![CDATA[Windows Machines]]></category>
		<category><![CDATA[Windows Xp Sp3]]></category>
		<category><![CDATA[World Timings]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=992</guid>
		<description><![CDATA[I&#8217;ve just uploaded a new Mandelbrot.py demo for pyCUDA, it adds a new calculation routine that straddles the numpy (C based math) and the pure-CUDA implementations. In total there are 4 variants to choose from. The speed differences are huge! Update &#8211; this Reddit thread has more details including real-world timings for two client problems [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just uploaded a new Mandelbrot.py demo for pyCUDA, it adds a new calculation routine that straddles the numpy (C based math) and the pure-CUDA implementations. In total there are 4 variants to choose from. The speed differences are huge!</p>
<p><strong>Update</strong> &#8211; this <a href="http://www.reddit.com/r/Python/comments/cpfaa/22937_faster_python_math_using_pycuda/" onclick="pageTracker._trackPageview('/outgoing/www.reddit.com/r/Python/comments/cpfaa/22937_faster_python_math_using_pycuda/?referer=');">Reddit thread</a> has more details including real-world timings for two client problems (showing 10-3,677* speed-ups over a C task).</p>
<p>This post builds upon my earlier <a href="http://ianozsvald.com/2010/01/26/pycuda-on-windows-and-mac-for-super-fast-python-math-using-cuda/">pyCUDA on Windows and Mac for super-fast Python math using CUDA</a>.</p>
<p>You&#8217;ll need <a href="http://developer.nvidia.com/object/cuda_3_1_downloads.html" onclick="pageTracker._trackPageview('/outgoing/developer.nvidia.com/object/cuda_3_1_downloads.html?referer=');">CUDA</a> 3.1 and <a href="http://mathema.tician.de/software/pycuda" onclick="pageTracker._trackPageview('/outgoing/mathema.tician.de/software/pycuda?referer=');">pyCUDA</a> installed with a compatible NVIDIA graphics card. This version of the Mandelbrot code forces single precision math &#8211; this means it&#8217;ll work on all CUDA cards (even the older ones &#8211; <a href="http://www.nvidia.com/object/cuda_gpus.html" onclick="pageTracker._trackPageview('/outgoing/www.nvidia.com/object/cuda_gpus.html?referer=');">full list</a>). It runs on my MacBook (Leopard) and Windows, the Windows machines use a 9800 GT and GTX 480. Here&#8217;s what it generates:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4793065042/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4793065042/?referer=');"><img class="aligncenter" title="Mandelbrot.py result for pyCUDA" src="http://farm5.static.flickr.com/4120/4793065042_0cea04fa97_m.jpg" alt="" width="228" height="240" /></a></p>
<p>The big-beast graphics card for my physics client is a <a href="http://www.nvidia.com/object/product_geforce_gtx_480_us.html" onclick="pageTracker._trackPageview('/outgoing/www.nvidia.com/object/product_geforce_gtx_480_us.html?referer=');">GTX 480</a> &#8211; this is NVIDIA&#8217;s top of the line consumer card (costing £420GBP in the UK a few weeks back). It is huge &#8211; it covers two slots, uses one PCIe 2.0&#215;16 slot and has a requirement for 300-400W of power (I&#8217;m using a 750W PSU to be safe on a Gigabyte GA H55M S2H motherboard):</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4793201874/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4793201874/?referer=');"><img class="aligncenter" title="GTX 480 CUDA card on motherboard" src="http://farm5.static.flickr.com/4114/4793201874_0fdf5f7c34_m.jpg" alt="" width="180" height="240" /></a></p>
<p>The <a href="http://wiki.tiker.net/PyCuda/Examples/Mandelbrot" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples/Mandelbrot?referer=');">mandelbrot.py</a> demo has four options (e.g. &#8216;python mandelbrot.py gpu&#8217;):</p>
<ul>
<li>&#8216;gpu&#8217; is a pure CUDA solution on the GPU</li>
<li>&#8216;gpuarray&#8217; uses a numpy-like CUDA wrapper in Python on the GPU</li>
<li>&#8216;numpy&#8217; is a pure Numpy (C-based) solution on the CPU</li>
<li>&#8216;python&#8217; is a pure Python solution on the CPU with numpy arrays</li>
</ul>
<p>The default problem is a 1000*1000 Mandelbrot plot with 1000 max iterations. I&#8217;m running this on a 2.9GHz dual core Windows XP SP3 with Python 2.6 (only 1 thread is used for all CPU tests). The timings:</p>
<ul>
<li>&#8216;gpu&#8217; &#8211; 0.07 seconds</li>
<li>&#8216;gpuarray&#8217; &#8211; 3.45 seconds &#8211; 49* slower than GPU version</li>
<li>&#8216;numpy&#8217; &#8211; 43.4 seconds &#8211; 620* slower than GPU version</li>
<li>&#8216;python&#8217; &#8211; 1605.6 seconds &#8211; 22,937* slower than GPU version</li>
<li>&#8216;python&#8217; with psyco.full() &#8211; 1428.3 seconds &#8211; 20,404* slower than GPU version</li>
</ul>
<p>By default mandelbrot.py forces single precision for all the math. Interestingly on my box if I let numpy default to numpy.complex128 (two double precision floating point numbers rather than numpy.complex64 with two single precision floats) then the Python result is faster:</p>
<ul>
<li>&#8216;numpy&#8217; &#8211; 34.0 seconds (double precision)</li>
<li>&#8216;python&#8217; &#8211; 627 seconds (double precision) &#8211; 2.5* faster than the single precision version</li>
</ul>
<p>The &#8217;22,937*&#8217; figure is a little unfair in light of the 627 second result (which is 8,957* slower) but I wanted to use only single precision math for consistency and compatibility across all CUDA cards (the older cards can only do single precision math).</p>
<p>On my older dual core 2.66GHz machine with a 9800 GT I get:</p>
<ul>
<li>&#8216;gpu&#8217; &#8211; 1.5 seconds</li>
<li>&#8216;gpuarray&#8217; &#8211; 7.1 seconds &#8211; 4.7* slower than GPU version</li>
<li>&#8216;numpy&#8217; &#8211; 51 seconds &#8211; 34* slower than GPU version</li>
<li>&#8216;python&#8217; &#8211; 1994.3 seconds &#8211; 1,329* slower than GPU version</li>
</ul>
<p>If we compare the 0.07 seconds for the GTX 480 against the 1.5 seconds for the 9800 GT (albeit on different machines but the runtime is just measuring the GPU work) then the GTX 480 is 21* faster than the 9800 GT. That&#8217;s not a bad speed-up for a couple of years difference in architectures.</p>
<p>If you take a look at the source code you&#8217;ll see that the &#8216;gpu&#8217; option uses a lump of C-like CUDA code, behind the scenes all pyCUDA code is converted into this C-like code and then down to <a href="http://en.wikipedia.org/wiki/Parallel_Thread_Execution" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Parallel_Thread_Execution?referer=');">PTX</a> via their compiler. This is the way to go if you understand the memory model and you want to write very fast code.</p>
<p>The gpuarray option uses a numpy-like interface to pyCUDA which, behind the scenes, is converted into CUDA code. Because it is compiled from Python code the resulting CUDA code isn&#8217;t as efficient &#8211; the compiler can&#8217;t make the same assumptions about memory usage as I can make when hand-crafting CUDA code (at least &#8211; that&#8217;s my best understanding at present!).</p>
<p>The numpy version uses C-based math running on the CPU &#8211; generally it is regarded as being &#8216;pretty darned fast&#8217;. The python version uses numpy arrays with straight Python arithmetic, this makes it awfully slow. Psyco 2.0.0 makes it a bit faster.</p>
<p>Feedback and extensions are welcomed via the <a href="http://wiki.tiker.net/PyCuda/Examples" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples?referer=');">wiki</a>!</p>
<p>If you want to get started then make sure you have a <a href="http://www.nvidia.com/object/cuda_gpus.html" onclick="pageTracker._trackPageview('/outgoing/www.nvidia.com/object/cuda_gpus.html?referer=');">compatible CUDA card</a>, get pyCUDA (<a href="http://wiki.tiker.net/PyCuda/Installation" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Installation?referer=');">installation instructions</a>), compile pyCUDA (takes 30 minutes from scratch if you&#8217;re on a well-known system), try the examples and run <a href="http://wiki.tiker.net/PyCuda/Examples/Mandelbrot" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples/Mandelbrot?referer=');">mandelbrot.py</a>. The <a href="http://lists.tiker.net/listinfo/pycuda" onclick="pageTracker._trackPageview('/outgoing/lists.tiker.net/listinfo/pycuda?referer=');">mailing list</a> is helpful.</p>
<p>It&#8217;d be nice to see some comparisons with PyPy, ShedSkin and other Python implementations. You&#8217;ll find links in my older <a href="http://ianozsvald.com/2008/11/17/making-python-math-196-faster-with-shedskin/">ShedSkin</a> post. It&#8217;ll also be interesting to tie this in to some of the A.I. projects in the <a href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a>, I&#8217;ll have to ponder some of the problems that might be tackled.</p>
<p>Books:</p>
<p>The following two books will be useful if you&#8217;re new to CUDA. The first is very friendly, I&#8217;m still finding it very useful.</p>
<table>
<tr>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0123814723" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0131387685" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/p6rYUljNtQo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/07/14/22937-faster-python-math-using-pycuda/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/07/14/22937-faster-python-math-using-pycuda/</feedburner:origLink></item>
		<item>
		<title>Presenting A.I. at FlashBrighton (using Python!)</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/OFYg-s1Yjbs/</link>
		<comments>http://ianozsvald.com/2010/07/11/presenting-a-i-at-flashbrighton-using-python/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 13:17:19 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Blah]]></category>
		<category><![CDATA[Blue Plaque]]></category>
		<category><![CDATA[Blurry Photo]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[English Heritage]]></category>
		<category><![CDATA[Face Detection]]></category>
		<category><![CDATA[Futurology]]></category>
		<category><![CDATA[General Knowledge]]></category>
		<category><![CDATA[Grey Scale]]></category>
		<category><![CDATA[Image Text]]></category>
		<category><![CDATA[International Competitions]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Music Theatre]]></category>
		<category><![CDATA[Ocr]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Plaques]]></category>
		<category><![CDATA[Privacy Invasion]]></category>
		<category><![CDATA[Python Source Code]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[Robots]]></category>
		<category><![CDATA[Tesseract]]></category>
		<category><![CDATA[Text Extraction]]></category>
		<category><![CDATA[Text Regions]]></category>
		<category><![CDATA[Toop]]></category>
		<category><![CDATA[Translator]]></category>
		<category><![CDATA[Video Link]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=970</guid>
		<description><![CDATA[A couple of weeks back I presented an Artificial Intelligence evening at FlashBrighton with John Montgomery and Emily Toop. The night covered optical character recognition, face detection, robots and some futurology. A video link should follow. Optical Character Recognition to Read Plaques Recently I&#8217;ve been playing with OCR to read photos with text, a particular [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks back I presented an <a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">Artificial Intelligence evening at FlashBrighton</a> with <a href="http://www.psychicorigami.com/" onclick="pageTracker._trackPageview('/outgoing/www.psychicorigami.com/?referer=');">John Montgomery</a> and <a href="http://emilytoop.com/" onclick="pageTracker._trackPageview('/outgoing/emilytoop.com/?referer=');">Emily Toop</a>. The night covered optical character recognition, face detection, robots and some futurology. A video link should follow.</p>
<p><strong>Optical Character Recognition to Read Plaques</strong></p>
<p>Recently I&#8217;ve been playing with OCR to read photos with text, a particular example I care about is extracting the text from English Heritage Plaques for the <a href="http://openplaques.org/" onclick="pageTracker._trackPageview('/outgoing/openplaques.org/?referer=');">OpenPlaques</a> project:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4701373630/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4701373630/?referer=');"><img class="aligncenter" title="Dartmouth plaque" src="http://farm5.static.flickr.com/4002/4701373630_5025fe6a4a_m.jpg" alt="" width="180" height="240" /></a></p>
<p>I gave an overview of the <a href="http://code.google.com/p/tesseract-ocr" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/tesseract-ocr?referer=');">tesseract</a> open source OCR tool (originally created by HP). Some of the notes I explained came from this <a href="http://tesseract-ocr.googlecode.com/files/TesseractOSCON.pdf" onclick="pageTracker._trackPageview('/outgoing/tesseract-ocr.googlecode.com/files/TesseractOSCON.pdf?referer=');">tesseract OSCON</a> paper. Some notes:</p>
<ul>
<li>tesseract ranked highly in international competitions for scanned-image text extraction</li>
<li>it works better if you remove non-text regions (e.g. you isolate just the blue plaque in the above image) and threshold the image to a grey scale</li>
<li>it runs very quickly &#8211; it&#8217;ll extract text in a fraction of a second so it will run on a mobile phone (iPhone ports exist)</li>
</ul>
<p>To get people thinking about the task from the computer&#8217;s point of view I had everyone read out the text from this blurry photo. Treating the image as a computer would see it shows that you need several passes to learn which country is involved and to guess at some of the terms:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/ehayes/397062588/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/ehayes/397062588/?referer=');"><img class="aligncenter" title="Blurry text for OCR demo" src="http://farm1.static.flickr.com/129/397062588_62fe20ec76_m.jpg" alt="" width="240" height="180" /></a></p>
<p style="text-align: left;">You can guess that the domain is music/theatre (which helps you to specialise the dictionary you&#8217;re using), based in the US (so you know that 1.25 is $1.25USD) and even though the time is hard to read it is bound to be 7.30PM (rather than 7.32 or 7.37) because events normally start on the hour or half hour. General knowledge about the domain greatly increases the chance that OCR can extract the correct text.</p>
<p style="text-align: left;">I talked about the forthcoming competition to write a Plaque-transcriber system, that project is close to starting and you can see demo Python source code in the <a href="http://aicookbook.com/wiki/Automatic_plaque_transcription" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/wiki/Automatic_plaque_transcription?referer=');">AI Cookbook</a>.</p>
<p><strong>Optical Character Recognition Web Service and Translator iPhone Demo</strong></p>
<p>To help make OCR a bit easier to use I&#8217;ve setup a simple website: <a href="http://ocr.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/ocr.aicookbook.com/?referer=');">http://ocr.aicookbook.com/</a>. You call a URL with an image that&#8217;s on the web (I use flickr for my examples) and it returns a JSON string with the translated text. The website is a few lines of Python code created using the fabulous <a href="http://bottle.paws.de/" onclick="pageTracker._trackPageview('/outgoing/bottle.paws.de/?referer=');">bottle.py</a>.</p>
<p>The JSON also contains a French translation and mp3 links for text to speech, this shows how easy it is to make a visual-assist device for the hard of sight.</p>
<p><a href="http://emilytoop.com/" onclick="pageTracker._trackPageview('/outgoing/emilytoop.com/?referer=');">Emily</a> built an iPhone demo based on this web service &#8211; you can a photograph of some text, it uploads the text to flickr, retrieves the JSON and then plays the mp3s and shows you the translated text.</p>
<p><strong>OCR on videos</strong></p>
<p>The final OCR demo shows a proof of concept that extracts keywords from <a href="http://showmedo.com/" onclick="pageTracker._trackPageview('/outgoing/showmedo.com/?referer=');">ShowMeDo</a>&#8216;s screencast videos. The screencasts show programming in action &#8211; it is easy to extract frames, perform OCR and build up strong lists of keywords. These keywords can then be added back to the ShowMeDo video page to give Google more indexable content.</p>
<p>There&#8217;s a write-up of the early system <a href="http://ianozsvald.com/2010/05/17/extracting-keyword-text-from-screencasts-with-ocr/">here</a>.</p>
<p><strong>OCR futurology</strong></p>
<p>Text is all around us and mobile phones are everywhere. It strikes me that sooner or later we&#8217;ll be pointing our mobile phone at a poster like this and we&#8217;ll get extra information in return:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4721567317/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4721567317/?referer=');"><img class="aligncenter" title="Poster from Dartmouth" src="http://farm2.static.flickr.com/1012/4721567317_4a7de65c24_m.jpg" alt="" width="180" height="240" /></a></p>
<p>From the photo we can extract names of places, we also know the phone&#8217;s location so a WikiPedia geo-lookup will return relevant pages. Probably we can also extract dates and costs from posters and these can go into our calendar. I used tesseract on this image and extracted enough information to link to several WikiPedia pages with history and a map.</p>
<p><strong>Face Detection for Privacy Invasion</strong></p>
<p>John and I built a system for correlating gowalla check-ins with faces seen in images from the <a href="http://cam.theskiff.org/" onclick="pageTracker._trackPageview('/outgoing/cam.theskiff.org/?referer=');">SkiffCam</a> &#8211; the webcam that&#8217;s hosted in the Skiff co-working space. The goal was to show that we lose quite a lot of privacy without realising it &#8211; the SkiffCam has 29,000 images (1Gb of data) dating back over several years.</p>
<p>Using openCV&#8217;s <a href="http://opencv.willowgarage.com/wiki/FaceDetection" onclick="pageTracker._trackPageview('/outgoing/opencv.willowgarage.com/wiki/FaceDetection?referer=');">face detection</a> system I extracted thousands of faces. John retrieved all the <a href="http://gowalla.com/spots/32096" onclick="pageTracker._trackPageview('/outgoing/gowalla.com/spots/32096?referer=');">gowalla check-ins</a> based at the Skiff and built a web service that lets us correlate the faces with check-ins. We showed faces for many well-known Brightoners including <a href="http://sebleedelisle.com/" onclick="pageTracker._trackPageview('/outgoing/sebleedelisle.com/?referer=');">Seb</a>, <a href="http://niquimerret.com/" onclick="pageTracker._trackPageview('/outgoing/niquimerret.com/?referer=');">Niqui</a>, <a href="http://paulofierro.com/" onclick="pageTracker._trackPageview('/outgoing/paulofierro.com/?referer=');">Paulo</a>, <a href="http://jot.is/" onclick="pageTracker._trackPageview('/outgoing/jot.is/?referer=');">Jon &amp; Anna</a> and <a href="http://natbat.net/" onclick="pageTracker._trackPageview('/outgoing/natbat.net/?referer=');">Nat</a>.</p>
<p>Given a persons face we could then train a face recogniser to see other occurrences of that person at the Skiff even if they&#8217;re not checking in with gowalla. We can also mine their twitter accounts for other identifying data like blogs and build a profile of where they go, who they know and what they talk about. This feels pretty invasive &#8211; all with open source tools and public data.</p>
<p><strong>Emotion detection</strong></p>
<p>Building on the face detector I next demonstrated the <a href="http://sourceforge.net/apps/mediawiki/pyvision/index.php?title=FaceL:_Facile_Face_Labeling" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/apps/mediawiki/pyvision/index.php?title=FaceL_Facile_Face_Labeling&amp;referer=');">FaceL</a> face labeling project from Colorado State Uni, built on <a href="http://sourceforge.net/apps/mediawiki/pyvision/index.php?title=Main_Page" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/apps/mediawiki/pyvision/index.php?title=Main_Page&amp;referer=');">pyVision</a>. The tool works out of the box on a Mac &#8211; it can learn several faces or poses during a live demo. Most face recognisers only label the name of the person &#8211; the difference with FaceL is that it can recognise basic emotional states such as &#8216;happy&#8217;, &#8216;neutral&#8217; and &#8216;sad&#8217;. This makes it really easy to work towards an emotion-detecting user interface.</p>
<p>During my demo I showed FaceL correctly recognising &#8216;happy&#8217; and &#8216;sad&#8217; on my face, then &#8216;left&#8217; and &#8216;right&#8217; head poses&#8217;, then &#8216;up&#8217; and &#8216;down&#8217; poses. I suspect with the up/down poses that it is really easy to build a nod-detecting interface!</p>
<p><strong>Headroid2 &#8211; a Face Tracking Robot</strong></p>
<p>Finally I demo&#8217;d Headroid2 &#8211; my face tracking robot (using the same openCV module as above) that uses an Arduino, a <a href="http://www.botbuilder.co.uk/ssb.html" onclick="pageTracker._trackPageview('/outgoing/www.botbuilder.co.uk/ssb.html?referer=');">servo board</a>, <a href="http://pyserial.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/pyserial.sourceforge.net/?referer=');">pySerial</a> and a few lines of code to give the robot the ability to track faces, smile and frown:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/lilspikey/4725075065/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/lilspikey/4725075065/?referer=');"><img class="aligncenter" title="Headroid2 with smiley face" src="http://farm2.static.flickr.com/1384/4725075065_4279547ba9_m.jpg" alt="" width="180" height="240" /></a></p>
<p>Here&#8217;s a video of the earlier version (without the smiling face feedback):</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>For full details including build instructions see <a href="http://blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/?referer=');">building a face tracking robot</a>.</p>
<p><strong>EuroPython</strong></p>
<p>I&#8217;ll bring Headroid3 (this adds face-seeking behaviour) to <a href="http://www.europython.eu/" onclick="pageTracker._trackPageview('/outgoing/www.europython.eu/?referer=');">EuroPython</a> in a few weeks, hopefully I can find a few other A.I. folk and we can run some demos.</p>
<p><strong>Reading material:</strong></p>
<p>If you&#8217;re curious about A.I. then the following books will interest you:</p>
<table>
<tr>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596516134" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596510519" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0615155111" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
</td>
</tr>
</table>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/OFYg-s1Yjbs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/07/11/presenting-a-i-at-flashbrighton-using-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/07/11/presenting-a-i-at-flashbrighton-using-python/</feedburner:origLink></item>
		<item>
		<title>Abandoned petrol pump</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/NEA8OSmptjQ/</link>
		<comments>http://ianozsvald.com/2010/07/09/abandoned-petrol-pump/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 21:35:29 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Blackman]]></category>
		<category><![CDATA[Housing Developments]]></category>
		<category><![CDATA[New England]]></category>
		<category><![CDATA[Olde English]]></category>
		<category><![CDATA[Sustainable Housing]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=973</guid>
		<description><![CDATA[Here&#8217;s a random moment &#8211; on Blackman Street just down from Brighton Station is this abandoned petrol pump. I&#8217;m curious to know what kind of business it supported &#8211; anyone know? This is the cheapside area of Brighton (meaning &#8216;market area&#8216; in olde English) known now as the New England Quarter &#8211; a few streets [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a random moment &#8211; on <a title="Blackman Street Brighton" href="http://www.openstreetmap.org/?lat=50.828964&amp;lon=-0.138707&amp;zoom=18&amp;layers=B000FTF" onclick="pageTracker._trackPageview('/outgoing/www.openstreetmap.org/?lat=50.828964_amp_lon=-0.138707_amp_zoom=18_amp_layers=B000FTF&amp;referer=');">Blackman Street</a> just down from Brighton Station is this abandoned petrol pump. I&#8217;m curious to know what kind of business it supported &#8211; anyone know?</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4770591967/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4770591967/?referer=');"><img class="aligncenter" title="Abandoned petrol pump on Blackman Street" src="http://farm5.static.flickr.com/4096/4770591967_ab039d89bc_m.jpg" alt="" width="180" height="240" /></a></p>
<p style="text-align: left;">This is the cheapside area of Brighton (meaning &#8216;<a href="http://en.wikipedia.org/wiki/Cheapside#Etymology_and_usage" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Cheapside_Etymology_and_usage?referer=');">market area</a>&#8216; in olde English) known now as the <a href="http://en.wikipedia.org/wiki/New_England_Quarter" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/New_England_Quarter?referer=');">New England Quarter</a> &#8211; a few streets from the new sustainable housing developments, green corridor and New England House.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/NEA8OSmptjQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/07/09/abandoned-petrol-pump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/07/09/abandoned-petrol-pump/</feedburner:origLink></item>
		<item>
		<title>Emily’s new blog</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/HRlDvbYbdbA/</link>
		<comments>http://ianozsvald.com/2010/06/27/emilys-new-blog/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 16:04:04 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[projectbrightonblogs]]></category>
		<category><![CDATA[sussexdigital]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cookbook]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Emily]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=966</guid>
		<description><![CDATA[Emily (@fluffyemily) has started a new blog &#8211; EmilyToop.com &#8211; to note her progress with iPhone app development, robotics and general geekery. Her first post is Objective Flickr on the iPhone, inspired by some of the difficulties she had building her demo app for my Optical Character Recognition web service on the A.I. Cookbook. Ian [...]]]></description>
			<content:encoded><![CDATA[<p>Emily (<a href="https://twitter.com/fluffyemily" onclick="pageTracker._trackPageview('/outgoing/twitter.com/fluffyemily?referer=');">@fluffyemily</a>) has started a new blog &#8211; <a title="Emily Toop" href="http://emilytoop.com" onclick="pageTracker._trackPageview('/outgoing/emilytoop.com?referer=');">EmilyToop.com</a> &#8211; to note her progress with iPhone app development, robotics and general geekery.</p>
<p>Her first post is <a title="Objective Flickr on the iPhone" href="http://emilytoop.com/2010/06/27/objective-flickr-on-the-iphone/" onclick="pageTracker._trackPageview('/outgoing/emilytoop.com/2010/06/27/objective-flickr-on-the-iphone/?referer=');">Objective Flickr on the iPhone</a>, inspired by some of the difficulties she had building her demo app for my <a title="optical character recognition using tesseract" href="http://ocr.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/ocr.aicookbook.com/?referer=');">Optical Character Recognition web service</a> on the A.I. Cookbook.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/HRlDvbYbdbA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/06/27/emilys-new-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/06/27/emilys-new-blog/</feedburner:origLink></item>
		<item>
		<title>Talking on Artificial Intelligence next Tuesday at FlashBrighton</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/H9tu9e8RyJM/</link>
		<comments>http://ianozsvald.com/2010/06/18/talking-on-artificial-intelligence-next-tuesday-at-flashbrighton/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 14:30:02 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[sussexdigital]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Assiduity]]></category>
		<category><![CDATA[Automatic Transcription]]></category>
		<category><![CDATA[Collaborator]]></category>
		<category><![CDATA[Concept Web]]></category>
		<category><![CDATA[Cookbook]]></category>
		<category><![CDATA[Face Detection]]></category>
		<category><![CDATA[Gentleman]]></category>
		<category><![CDATA[Goode]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Little Time]]></category>
		<category><![CDATA[Open Source Libraries]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Privacy Invasion]]></category>
		<category><![CDATA[Proof Of Concept]]></category>
		<category><![CDATA[Repute]]></category>
		<category><![CDATA[Seb]]></category>
		<category><![CDATA[Skiff]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=961</guid>
		<description><![CDATA[I&#8217;ve been invited to speak with John Montgomery next Tuesday at FlashBrighton &#8211; 7pm at The Werks for 1.5-2 hours or so of demos. We&#8217;ll be covering: Head tracking robot (build your own in a few hours!) Skiff Privacy Invasion &#8211; what we can learn from data mining the SkiffCam (the Gov&#8217;t can do it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been invited to speak with John Montgomery next <a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">Tuesday at FlashBrighton</a> &#8211; 7pm at The Werks for 1.5-2 hours or so of demos. We&#8217;ll be covering:</p>
<ul>
<li>Head tracking robot (build your own in a few hours!)</li>
<li>Skiff Privacy Invasion &#8211; what we can learn from data mining the SkiffCam (the Gov&#8217;t can do it &#8211; now you can too)</li>
<li>Optical Character Recognition web service with an iPhone visual-assistant demo</li>
<li>Automatic transcription of <a href="http://openplaques.org/" onclick="pageTracker._trackPageview('/outgoing/openplaques.org/?referer=');">OpenPlaques</a> images (because Google can&#8217;t read images!)</li>
<li>Extracting text from videos to feed Google (because Google can&#8217;t read videos!)</li>
<li>Face detection proof of concept web service</li>
</ul>
<p>Which, frankly, is quite a lot to cover in 1.5 hours and a couple of the demos still need some development&#8230;but that&#8217;s part of the fun, right? The demos are mostly in Python and will be written up on the <a href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a>. The goal is to show non-A.I. programmers that a lot of A.I. is pretty accessible now via good open-source libraries.</p>
<p>Richard has given me a lovely Victorian-researcher inspired write-up, it is <a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">worth a proper read</a>:</p>
<blockquote><p>I have spoken this night with <a onclick="pageTracker._trackPageview('/outgoing/sebleedelisle.com/?referer=');javascript:pageTracker._trackPageview('/outgoing/sebleedelisle.com/');" href="http://sebleedelisle.com/">Sir Seb Lee-Delisle</a>, the gentleman  who runs the FlashBrighton club, an institution of long standing  repute. He expressed great delight with my research into Artificial  Intelligence, which he assuryes me he has been following with the  greatest assiduity, and kindly invited me to present my findings at his  club. I did of course accept, and have spent the remaynder of the day  deliberating over how I might present these goode labours. I have  settled on involving my <a onclick="pageTracker._trackPageview('/outgoing/fivepoundapp.com/?referer=');javascript:pageTracker._trackPageview('/outgoing/fivepoundapp.com/');" href="http://fivepoundapp.com/">£5 app</a> collaborator <a onclick="pageTracker._trackPageview('/outgoing/www.psychicorigami.com/?referer=');javascript:pageTracker._trackPageview('/outgoing/www.psychicorigami.com/');" href="http://www.psychicorigami.com/">Mr. John Montgomery</a>, with  whom I have been engaged on a number of projects for some little time  now. &#8230;</p>
<p>[<a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">keep reading</a>]</p></blockquote>
<p>We&#8217;ll hope to see you along!</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/H9tu9e8RyJM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/06/18/talking-on-artificial-intelligence-next-tuesday-at-flashbrighton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/06/18/talking-on-artificial-intelligence-next-tuesday-at-flashbrighton/</feedburner:origLink></item>
		<item>
		<title>Headroid1 – a face tracking robot head</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/WpHs6O2DcHw/</link>
		<comments>http://ianozsvald.com/2010/05/21/headroid1-a-face-tracking-robot-head/#comments</comments>
		<pubDate>Fri, 21 May 2010 13:44:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Andy White]]></category>
		<category><![CDATA[Building Robot]]></category>
		<category><![CDATA[Chap]]></category>
		<category><![CDATA[Coffee]]></category>
		<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[Concentration]]></category>
		<category><![CDATA[Cookbook]]></category>
		<category><![CDATA[Degress]]></category>
		<category><![CDATA[Doddle]]></category>
		<category><![CDATA[Emotions]]></category>
		<category><![CDATA[Face Detection]]></category>
		<category><![CDATA[Frustration]]></category>
		<category><![CDATA[Glare]]></category>
		<category><![CDATA[Heather]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Minute Mp3]]></category>
		<category><![CDATA[Opencv]]></category>
		<category><![CDATA[Philips Spc900nc]]></category>
		<category><![CDATA[Pretty Faces]]></category>
		<category><![CDATA[Py]]></category>
		<category><![CDATA[Pyserial]]></category>
		<category><![CDATA[Python Bindings]]></category>
		<category><![CDATA[Reference Material]]></category>
		<category><![CDATA[Robocam]]></category>
		<category><![CDATA[Robot Head]]></category>
		<category><![CDATA[Servo]]></category>
		<category><![CDATA[Silicon Beach Training]]></category>
		<category><![CDATA[Smile]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=936</guid>
		<description><![CDATA[The video below introduces Headroid1, this face-tracking robot will grow into a larger system that can follow people&#8217;s faces, detect emotions and react to engage with the visitor. The above system uses openCV&#8217;s face detection (using the Python bindings and facedetect.py) to figure out whether the face is in the centre of the screen, if [...]]]></description>
			<content:encoded><![CDATA[<p>The video below introduces Headroid1, this face-tracking robot will grow into a larger system that can follow people&#8217;s faces, detect emotions and react to engage with the visitor.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The above system uses openCV&#8217;s <a href="http://opencv.willowgarage.com/wiki/FaceDetection" onclick="pageTracker._trackPageview('/outgoing/opencv.willowgarage.com/wiki/FaceDetection?referer=');">face detection</a> (using the Python bindings and facedetect.py) to figure out whether the face is in the centre of the screen, if the camera needs to move it then talks via <a href="http://pyserial.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/pyserial.sourceforge.net/?referer=');">pySerial</a> to <a href="http://www.botbuilder.co.uk/store/index.php" onclick="pageTracker._trackPageview('/outgoing/www.botbuilder.co.uk/store/index.php?referer=');">BotBuilder</a>&#8216;s ServoBoard to pan or tilt the camera until the face is back in the centre of the screen.</p>
<p><strong>Update</strong> &#8211; see <a href="http://blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/?referer=');">Building A Face Tracking Robot In An Afternoon</a> for full details to build your own Headroid1.</p>
<p>Headroid is pretty good at tracking faces as long as there&#8217;s no glare, he can see people from 1 foot up to about 8 feet from the camera. He moves at different speeds depending on your distance from the centre of the screen and stops with a stable picture when you&#8217;re back at the centre of his attention. The smile/frown detector which will follow will add another layer of behaviour.</p>
<p><a href="http://www.facebook.com/#!/SBTtraining?ref=ts" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/_/SBTtraining?ref=ts&amp;referer=');">Heather</a> (founder of <a href="http://www.siliconbeachtraining.co.uk/" onclick="pageTracker._trackPageview('/outgoing/www.siliconbeachtraining.co.uk/?referer=');">Silicon Beach Training</a>) used Headroid1 (called Robocam in her video) at <a href="http://www.facebook.com/#!/group.php?gid=33691973165&amp;ref=ts" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/_/group.php?gid=33691973165_amp_ref=ts&amp;referer=');">Likemind</a> coffee this morning, she&#8217;s <a href="http://www.siliconbeachtraining.co.uk/blog/python-programming-face-detection/" onclick="pageTracker._trackPageview('/outgoing/www.siliconbeachtraining.co.uk/blog/python-programming-face-detection/?referer=');">written up the event</a>:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/IJgV_P1YFjQ&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/IJgV_P1YFjQ&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Andy White (<a href="http://twitter.com/doctorpod" onclick="pageTracker._trackPageview('/outgoing/twitter.com/doctorpod?referer=');">@doctorpod</a>) also did a quick 2 minute MP3 interview with me <a href="http://audioboo.fm/boos/132833-hedroid" onclick="pageTracker._trackPageview('/outgoing/audioboo.fm/boos/132833-hedroid?referer=');">via audioboo</a>.</p>
<p>Later over coffee <a href="http://yandleblog.com/" onclick="pageTracker._trackPageview('/outgoing/yandleblog.com/?referer=');">Danny Hope</a> and I discussed (with Headroid looking on) some ideas for tracking people, watching for attention, monitoring for frustration and concentration and generally playing with ways people might interact with this little chap:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4626280009/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4626280009/?referer=');"><img class="aligncenter" title="Headroid1 tracks Danny Hope over coffee" src="http://farm5.static.flickr.com/4043/4626280009_e08d9e1854_m.jpg" alt="" width="180" height="240" /></a></p>
<p>The above was built in collaboration with <a href="http://www.buildbrighton.com/" onclick="pageTracker._trackPageview('/outgoing/www.buildbrighton.com/?referer=');">BuildBrighton</a>, there&#8217;s some discussion about it in <a href="http://groups.google.com/group/brightonhackerspace/browse_thread/thread/62ee77d2effdf9a9" onclick="pageTracker._trackPageview('/outgoing/groups.google.com/group/brightonhackerspace/browse_thread/thread/62ee77d2effdf9a9?referer=');">this thread</a>. The camera is a Philips SPC900NC which works using <a href="http://webcam-osx.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/webcam-osx.sourceforge.net/?referer=');">macam</a> on my Mac (and runs on Linux and Win too). The ServoBoard has a super-simple interface &#8211; you send it commands like &#8217;90a&#8217; (turn servo A to 90 degress) as text and &#8216;it just works&#8217; &#8211; it makes interactive testing a doddle.</p>
<p><strong>Update</strong> &#8211; the <a title="Artificial Intelligence Cookbook blog" href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">blog</a> for the <a title="Artificial Intelligence Cookbook" href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a> is now active, more A.I. and robot updates will occur there.</p>
<p><strong>Reference material:</strong></p>
<p>The following should help you move forwards:</p>
<table>
<tr>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596516134" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596510519" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=1430224770" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
</td>
</tr>
</table>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/WpHs6O2DcHw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/05/21/headroid1-a-face-tracking-robot-head/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/05/21/headroid1-a-face-tracking-robot-head/</feedburner:origLink></item>
		<item>
		<title>Extracting keyword text from screencasts with OCR</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/bj6QR_QesQk/</link>
		<comments>http://ianozsvald.com/2010/05/17/extracting-keyword-text-from-screencasts-with-ocr/#comments</comments>
		<pubDate>Mon, 17 May 2010 20:06:58 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Screencasting]]></category>
		<category><![CDATA[ShowMeDo]]></category>
		<category><![CDATA[Arange]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Artefacts]]></category>
		<category><![CDATA[Endpoints]]></category>
		<category><![CDATA[Flv]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Garbage]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Grid Arrays]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Np]]></category>
		<category><![CDATA[Ocr]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Plaque Text]]></category>
		<category><![CDATA[Plaques]]></category>
		<category><![CDATA[Recognition System]]></category>
		<category><![CDATA[Rr]]></category>
		<category><![CDATA[Searchers]]></category>
		<category><![CDATA[Ss]]></category>
		<category><![CDATA[Tesseract]]></category>
		<category><![CDATA[Thresholding]]></category>
		<category><![CDATA[Video Data]]></category>
		<category><![CDATA[Video Frames]]></category>
		<category><![CDATA[Visual Quality]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=930</guid>
		<description><![CDATA[Last week I played with the Optical Character Recognition system tesseract applied to video data. The goal &#8211; extract keywords from the video frames so Google has useful text to index. I chose to work with ShowMeDo&#8216;s screencasts as many show programming in action &#8211; there&#8217;s great keyword information in these videos that can be [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I played with the Optical Character Recognition system tesseract applied to video data. The goal &#8211; extract keywords from the video frames so Google has useful text to index.</p>
<p>I chose to work with <a href="http://showmedo.com/" onclick="pageTracker._trackPageview('/outgoing/showmedo.com/?referer=');">ShowMeDo</a>&#8216;s screencasts as many show programming in action &#8211; there&#8217;s great keyword information in these videos that can be exposed for Google to crawl. This builds on my recent <a href="http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/">OCR for plaques</a> project.</p>
<p>I&#8217;ll blog in the future about the full system, this is a quick how-to if you want to try the system yourself.</p>
<p>First &#8211; get a video. I downloaded video <a href="http://videos1.showmedo.com/ShowMeDos/10370000.flv" onclick="pageTracker._trackPageview('/outgoing/videos1.showmedo.com/ShowMeDos/10370000.flv?referer=');">10370000.flv</a> from <a href="http://showmedo.com/videotutorials/video?name=10370000&amp;fromSeriesID=1037" onclick="pageTracker._trackPageview('/outgoing/showmedo.com/videotutorials/video?name=10370000_amp_fromSeriesID=1037&amp;referer=');">Introducing numpy arrays</a> (part 1 of 11).</p>
<p>Next &#8211; extract a frame. Using ffmpeg I extracted a frame at 240 seconds as a JPG:</p>
<pre><strong>ffmpeg</strong> -i 10370000.flv -y -f image2 -ss 240 -sameq -t 0.001  10370000_240.jpg</pre>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4615696727/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4615696727/?referer=');"><img class="aligncenter" title="10370000.flv image at 240 seconds" src="http://farm5.static.flickr.com/4019/4615696727_e03fb025cb_m.jpg" alt="" width="240" height="180" /></a></p>
<p>Tesseract needs <a href="http://en.wikipedia.org/wiki/Tif" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Tif?referer=');">TIF</a> input files (not JPGs) so I used GIMP to convert to TIF.</p>
<p>Finally I applied tesseract to extract text:</p>
<pre><strong>tesseract</strong> 10370000_30.tif 10370000_30 -l eng</pre>
<p>This yields:</p>
<pre><em>than rstupr .
See Also
linspate : Evenly spaced numbers with  careful handling of endpoints.
grid: Arrays of evenly spared numbers  in Nrdxmensmns
grid: Grid—shaped arrays of evenly spaced numbers in  Nwiunensxnns
Examples
&gt;&gt;&gt; np.arange(3)
¤rr¤y([¤. 1.  2])
&gt;&gt;&gt; np4arange(3.B)
array([ B., 1., 2.])
&gt;&gt;&gt;  np.arange(3,7)
array([3, A, S, 6])
&gt;&gt;&gt; np.arange(3,7,?)
·=rr··¤y&lt;[3.  5])
III
Ill</em></pre>
<p>Obviously there&#8217;s some garbage in the above but there are also a lot of useful keywords!</p>
<p>To clean up the extraction I&#8217;ll be experimenting with:</p>
<ul>
<li>Using the original AVI video rather than the FLV (which contains compression artefacts which reduce the visual quality), the FLV is also watermarked with ShowMeDo&#8217;s logo which hurts some images</li>
<li>Cleaning the image &#8211; perhaps applying some thresholding or highlighting to make the text stand out, possibly the green text is causing a problem in this image</li>
<li>Training tesseract to read the terminal fonts commonly found in ShowMeDo videos</li>
</ul>
<p>I tried four images for this test, in all cases useful text was extracted. I suspect that by rejecting short words (less than four characters) and using words that appear at least twice in the video then I&#8217;ll have a clean set of useful keywords.</p>
<p><strong>Update</strong> &#8211; the <a title="Artificial Intelligence Cookbook blog" href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">blog</a> for the <a title="Artificial Intelligence Cookbook" href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a> is now active, more  A.I. and robot updates will occur there.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/bj6QR_QesQk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/05/17/extracting-keyword-text-from-screencasts-with-ocr/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://videos1.showmedo.com/ShowMeDos/10370000.flv" length="11454655" type="video/x-flv" />
		<feedburner:origLink>http://ianozsvald.com/2010/05/17/extracting-keyword-text-from-screencasts-with-ocr/</feedburner:origLink></item>
		<item>
		<title>“Artificial Intelligence in the Real World” lecture at Sussex University 2010</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/pU3LqcyCXWM/</link>
		<comments>http://ianozsvald.com/2010/05/10/artificial-intelligence-in-the-real-world-lecture-at-sussex-university-2010/#comments</comments>
		<pubDate>Mon, 10 May 2010 17:59:57 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ShowMeDo]]></category>
		<category><![CDATA[SussexUniversity]]></category>
		<category><![CDATA[projectbrightonblogs]]></category>
		<category><![CDATA[sussexdigital]]></category>
		<category><![CDATA[£5 App Meet]]></category>
		<category><![CDATA[10 Years]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Bangalores]]></category>
		<category><![CDATA[Business Project]]></category>
		<category><![CDATA[Challenge Entries]]></category>
		<category><![CDATA[Collaborative Project]]></category>
		<category><![CDATA[Cookbook]]></category>
		<category><![CDATA[Darpa Grand Challenge]]></category>
		<category><![CDATA[Firearms]]></category>
		<category><![CDATA[Guest Lecture]]></category>
		<category><![CDATA[High Performance Computing]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Project Ideas]]></category>
		<category><![CDATA[Real World]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[Saving Private Ryan]]></category>
		<category><![CDATA[Slides]]></category>
		<category><![CDATA[Sussex]]></category>
		<category><![CDATA[Sussex University]]></category>
		<category><![CDATA[Undergraduates]]></category>
		<category><![CDATA[World Lecture]]></category>
		<category><![CDATA[Youtube Video]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=915</guid>
		<description><![CDATA[I&#8217;m chuffed to have delivered the second version of my &#8220;A.I. in the real world&#8221; lecture (I gave it last May too) to 2nd year undergraduates at Sussex University this afternoon. The slides are below, I cover: A.I. that I&#8217;ve seen and have been involved with in the last 10 years Some project ideas for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m chuffed to have delivered the second version of my &#8220;A.I. in the real world&#8221; lecture (I gave it <a href="http://ianozsvald.com/2009/05/19/ai-in-the-real-world-lecture-at-sussex-university/">last May</a> too) to 2nd year undergraduates at Sussex University this afternoon.</p>
<p>The slides are below, I cover:</p>
<ul>
<li>A.I. that I&#8217;ve seen and have been involved with in the last 10 years</li>
<li>Some project ideas for undergraduates</li>
<li>How to start a new tech business/project in A.I.</li>
</ul>
<p>In the talk I also showed or talked about:</p>
<ul>
<li>A YouTube video of the DARPA Grand Challenge (down below)</li>
<li><a href="http://www.imfdb.org/index.php/Saving_Private_Ryan#M1A1_Bangalore_Torpedo" onclick="pageTracker._trackPageview('/outgoing/www.imfdb.org/index.php/Saving_Private_Ryan_M1A1_Bangalore_Torpedo?referer=');">The Internet Movie Firearms Database</a> when talking about searching for &#8220;movie on a beach with bangalores&#8221; which resolves to Saving Private Ryan&#8230;if someone writes this search engine</li>
<li><a href="http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/">Optical Character Recognition</a> using the open source Tesseract</li>
<li>pyCUDA and high performance computing (which I&#8217;m teaching at <a href="http://brightonpy.org/" onclick="pageTracker._trackPageview('/outgoing/brightonpy.org/?referer=');">BrightonPy</a> soon)</li>
<li>My plan for an <a href="http://ianozsvald.com/2010/04/04/new-book-a-practical-artificial-intelligence-handbook/">Artificial Intelligence Handbook</a> (collaborative project &#8211; all welcome!)</li>
<li><a href="http://buildbrighton.com/" onclick="pageTracker._trackPageview('/outgoing/buildbrighton.com/?referer=');">BuildBrighton</a> &#8211; the local HackerSpace</li>
<li><a href="http://fivepoundapp.com/" onclick="pageTracker._trackPageview('/outgoing/fivepoundapp.com/?referer=');">£5 App event</a> &#8211; celebrating people who build need stuff</li>
<li><a href="http://flashbrighton.org/" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?referer=');">FlashBrighton</a> &#8211; lots of interesting talks</li>
<li><a href="http://www.facebook.com/group.php?gid=33691973165" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/group.php?gid=33691973165&amp;referer=');">LikeMind coffees</a> &#8211; lots of interesting people</li>
</ul>
<p><a style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;" title="View Artificial Intelligence in the Real World May 2010 Sussex University Guest Lecture on Scribd" href="http://www.scribd.com/doc/31149763/Artificial-Intelligence-in-the-Real-World-May-2010-Sussex-University-Guest-Lecture" onclick="pageTracker._trackPageview('/outgoing/www.scribd.com/doc/31149763/Artificial-Intelligence-in-the-Real-World-May-2010-Sussex-University-Guest-Lecture?referer=');">Artificial Intelligence in the Real World May 2010 Sussex University Guest Lecture</a> <object id="doc_954498868160807" style="outline: none;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="doc_954498868160807" /><param name="data" value="http://d1.scribdassets.com/ScribdViewer.swf" /><param name="wmode" value="opaque" /><param name="bgcolor" value="#ffffff" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="FlashVars" value="document_id=31149763&amp;access_key=key-2b3rtj49qmb18ckxpbp2&amp;page=1&amp;viewMode=slideshow" /><param name="src" value="http://d1.scribdassets.com/ScribdViewer.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="document_id=31149763&amp;access_key=key-2b3rtj49qmb18ckxpbp2&amp;page=1&amp;viewMode=slideshow" /><embed id="doc_954498868160807" style="outline: none;" type="application/x-shockwave-flash" width="100%" height="600" src="http://d1.scribdassets.com/ScribdViewer.swf" flashvars="document_id=31149763&amp;access_key=key-2b3rtj49qmb18ckxpbp2&amp;page=1&amp;viewMode=slideshow" allowscriptaccess="always" allowfullscreen="true" bgcolor="#ffffff" wmode="opaque" data="http://d1.scribdassets.com/ScribdViewer.swf" name="doc_954498868160807"></embed></object></p>
<p>Here&#8217;s the YouTube video showing the Grand Challenge entries:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/M2AcMnfzpNg&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/M2AcMnfzpNg&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>Update</strong> &#8211; the <a title="Artificial Intelligence Cookbook blog" href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">blog</a> for the <a title="Artificial Intelligence Cookbook" href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a> is now active, more  A.I. and robot updates will occur there.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/pU3LqcyCXWM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/05/10/artificial-intelligence-in-the-real-world-lecture-at-sussex-university-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/05/10/artificial-intelligence-in-the-real-world-lecture-at-sussex-university-2010/</feedburner:origLink></item>
		<item>
		<title>Tesseract optical character recognition to read plaques</title>
		<link>http://feedproxy.google.com/~r/EntrepreneurialGeekiness/~3/-WULsmE64Cg/</link>
		<comments>http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 21:36:25 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Accuracy Test]]></category>
		<category><![CDATA[Balley]]></category>
		<category><![CDATA[Color Image]]></category>
		<category><![CDATA[Computer Research]]></category>
		<category><![CDATA[Early Computer]]></category>
		<category><![CDATA[Easure]]></category>
		<category><![CDATA[English Heritage]]></category>
		<category><![CDATA[James Britton]]></category>
		<category><![CDATA[Leasure]]></category>
		<category><![CDATA[Libtiff]]></category>
		<category><![CDATA[Macbook]]></category>
		<category><![CDATA[Ocr Engine]]></category>
		<category><![CDATA[Ocr Package]]></category>
		<category><![CDATA[Ocr Systems]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Org Project]]></category>
		<category><![CDATA[Pertinent Text]]></category>
		<category><![CDATA[Recognition Results]]></category>
		<category><![CDATA[Shipbuilder]]></category>
		<category><![CDATA[Tar Gz]]></category>
		<category><![CDATA[Tesseract Ocr]]></category>
		<category><![CDATA[Tiff Reader]]></category>
		<category><![CDATA[Uncompressed Tiff Images]]></category>
		<category><![CDATA[Ussex]]></category>
		<category><![CDATA[Visual Noise]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=892</guid>
		<description><![CDATA[The tesseract engine (wikipedia) is a very capable OCR package, I&#8217;m playing with it after a thought for my AI Handbook plan. OCR is a pretty interesting subject, it drove a lot of early computer research as it was used to automate paper filing for banks and companies like Readers Digest. This TesseractOSCON paper gives [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://code.google.com/p/tesseract-ocr/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/tesseract-ocr/?referer=');">tesseract</a> engine (<a href="http://en.wikipedia.org/wiki/Tesseract_%28software%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Tesseract_28software_29?referer=');">wikipedia</a>) is a very capable <a href="http://en.wikipedia.org/wiki/Optical_character_recognition" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Optical_character_recognition?referer=');">OCR</a> package, I&#8217;m playing with it after a thought for my <a href="http://ianozsvald.com/2010/04/04/new-book-a-practical-artificial-intelligence-handbook/">AI Handbook</a> plan. OCR is a pretty interesting subject, it drove a lot of early computer research as it was used to automate paper filing for banks and companies like Readers Digest. This <a href="http://tesseract-ocr.googlecode.com/files/TesseractOSCON.pdf" onclick="pageTracker._trackPageview('/outgoing/tesseract-ocr.googlecode.com/files/TesseractOSCON.pdf?referer=');">TesseractOSCON</a> paper gives a nice summary of how it works.</p>
<p><strong>Update</strong> &#8211; almost 100% perfect recognition results are possible, see <a href="http://blog.aicookbook.com/2010/06/optical-character-recognition-webservice-work-in-progress/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/2010/06/optical-character-recognition-webservice-work-in-progress/?referer=');">OCR Webservice work-in-progress</a> for an update.</p>
<p>As it states on the website:</p>
<blockquote><p>&#8220;The Tesseract OCR engine was one of the top 3 engines in the 1995 UNLV Accuracy test. Between 1995 and 2006 it had little work done on it, but it is probably one of the most accurate open source OCR engines available. The source code will read a binary, grey or color image and output text. A tiff reader is built in that will read uncompressed TIFF images, or libtiff can be added to read compressed images.&#8221;</p></blockquote>
<p>I wanted to see how well it might extract the text from English Heritage plaques for the <a href="http://openplaques.org/" onclick="pageTracker._trackPageview('/outgoing/openplaques.org/?referer=');">openplaques.org</a> project. At the weekend I took this photo:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4486427239/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4486427239/?referer=');"><img class="aligncenter" title="Swiss Gardens Plaque in Shoreham" src="http://farm3.static.flickr.com/2744/4486427239_d455d3ae9d_m.jpg" alt="" width="180" height="240" /></a></p>
<p>On the command line I ran:</p>
<blockquote><p>tesseract SwissGardensPlaque.tif output.txt -l eng</p></blockquote>
<p>and the result in output.txt was:</p>
<pre>"VICTORIAN
 1=e—1.EAsuRE masonrr
_ _ THE
SWISS GARDENS
FOUNDED HERE
IN 1838 E
x BY
JAMES BRITTON BALLEY
SHIPBUILDER
9/ 1789 — 1863 N
x
égpis COQQE
USSEX c0UN“"</pre>
<p>Obviously the result isn&#8217;t brilliant but all the major text is present &#8211; this is without any training or preparation.</p>
<p>As a pre-processing test I flattened the image to a bitdepth of 1 (black and white), rotated the image a little to make the text straight and cropped some of the unnecessary parts of the image. The recognition improves a small amount, the speckling and the bent text are still a problem:</p>
<pre>"W,R¤¤AM a
‘ A
VICTORlAN
i ‘ P-LEASURE RESORT
SWISS GARDENS
FOUNDED mama
IN 1838
BY
JAMES\ BRITTON BALLEY
SHIPBUILDER
1789 - 1863
lb (9*,
6*7 S 006
USSEX couw 1"</pre>
<p>I tried a few others plaques and the results were similar &#8211; generally all the pertinent text came through along with some noise.</p>
<p>On my MacBook it took 20 minutes to get started. I downloaded:</p>
<ul>
<li>tesseract-2.04.tar.gz</li>
<li>tesseract-2.00.eng.tar.gz</li>
</ul>
<p>As noted in the <a href="http://code.google.com/p/tesseract-ocr/wiki/ReadMe" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/tesseract-ocr/wiki/ReadMe?referer=');">README</a> I extracted the .eng data files into tessdata/, ran &#8216;./configure&#8217;, &#8216;make&#8217;, &#8216;sudo make install&#8217; and that was all.</p>
<p>For future research there are other OCR systems with <a href="http://en.wikipedia.org/wiki/OCR_SDK" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/OCR_SDK?referer=');">SDKs</a>. The algorithms used for <a href="http://en.wikipedia.org/wiki/Automatic_number_plate_recognition#Algorithms" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Automatic_number_plate_recognition_Algorithms?referer=');">number plate recognition</a> might be an interesting place to start further research.</p>
<p><strong>Update</strong> &#8211; the <a title="Artificial Intelligence Cookbook blog" href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">blog</a> for the <a title="Artificial Intelligence Cookbook" href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a> is now active, more  A.I. and robot updates will occur there.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.<img src="http://feeds.feedburner.com/~r/EntrepreneurialGeekiness/~4/-WULsmE64Cg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.663 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-19 23:17:53 -->
