Category Archives: Programming

Deep Learning Image Recognition and Detection on iOS Camera Using tensorflow

Classification on iOS

https://github.com/tensorflow/tensorflow/tree/r1.2/tensorflow/contrib/ios_examples

Just ran first ran deep learning model with the camera app example. Pretty good image recognition!!

Detection on iOS

The next level is object detection, i.e creating a bounding box around detected image.

https://github.com/yjmade/ios_camera_object_detection

Image classification iOS camera using deep learning

image detection using deep learning put a bounding box

image detection using deep learning put a bounding box

CatGAN – Cat Faces Generative Adversarial Networks Conditional GAN Using Pytorch

Released CatGan code. This was done as last assignment for NYU Deep Learning course, taught by Yann Lecun. This is a conditional GAN, and can train it to generate 4 different types of cats i.e. white, golden, black and mix.

https://github.com/navacron/deeplearning/tree/master/pytorch/catgan

The following is output conditioned on golden cats. By favorite one is 3rd one from the right in the first row. Everytime the GAN is run it will generate unique cats like these. For more cats visit the github page.

Golden Cats from CatGAN

Golden Cats from CatGAN

 

 

PyTorch Deep Learning Neural Network and Chain Rule Tutorial

I have release ipython tutorial notebooks for neural network  using pytorch. Pytorch is implementation of torch in python released by Facebook. This is what is being used in the Deep Learning course that I am taking at NYU, taught by professor Yann Lecun

https://github.com/navacron/deeplearning/tree/master/pytorch

This uses the autograd feature that is unique to pytoch and torch (not available in tensorflow). This is pytorch version of cs231n http://cs231n.github.io/neural-networks-case-study/

 

Sublime Text 3 is my favorite text editor

http://www.sublimetext.com/

This text editor is by far my favorite! It picks up where textmate left off. It has the ease of use of a simple text editor, and can be enhanced to mimic a full fledge IDE. It has  a great plugin support. I especially love the SublimeRepl plugin and make scripting repl programming very easy (easier than emacs). I have tried repl with python, octave, shell, works really great. Some useful plugins are

  • SublimeRepl – for repl integration to python, shell, octave, ocaml, scheme etc.
  • GoSublime – for GoLang development
  • PacakgeControl – the first plugin to install to manage all plugins
  • Git – Can do most of git commands from Sublime
  • Terminal – Open path of file in xterm

Command P or Command+Shit+P gives you most of the power to run most of your plugins, or search.

 

At JavaOne 2013

Went to JavaOne 2013 held in San Francisco. Was a great learning experience. However I felt that the JavaOne website to schedule conference was bit outdated. Java seems to be an aging language, though the most used. As the architect for Java said, Java is not dead yet, referencing the new feature of Java 8 i.e. closures and streams.

Some of the stuff I learnt

  • Java 8 Closures Streams
  • Programming with Java on Raspberry Pi. See my project mentioned on the Java site called Domotix.
  • MongoDb
  • Elastic Search
  • New features for Spring
  • Introduction to R

Also saw Maroon 5 at the Oracle party at Treasure Island.

With Humanoid robot Nao at the conference. Nao is the humanoid platform for robocup tournament.
IMG_0936

PriceThinker.com first version launched!

My first weekend .com startup initiative has launched. It has taken exactly 2 weekends to hack up this site. See logo

pricethinker100x100

 

Pricethinker is a very useful machine learning application that can predict prices based on numeric features data. For example if one is out shopping, and looking at many similar products, it is hard to figure out the best value product i.e. which gives most features to the price. This tool helps you do complicated price analysis.

A simple example is house price prediction based on 1 feature, say square feet. Which one of the following is the best value? What should be the price of 2000 sq feet be? Pricethinker is exactly the tool to help you. Imagine how complicated it becomes if you also put bathrooms, garage etc into the equation. Its much easier for PriceThinker to do the number crunching for you.

Sq Ft – Price
—————-
2200 – 340000
2100 – 310000
1900 – 260000
2500 – 370000

Pricethinker will tell you that the home with 1900 sq ft is the best value. And a home with 2000 sq ft should cost 288459. The power of machine learning is at your service with simplicity and beautifully!

Putty ssh seession timeouts to qucikly on windows fix

Update the Windows Registry to create or change the TcpMaxDataRetransmissions

The problem of PuTTY or other SSH connections timing out too quickly when network connectivity is briefly lost is Windows problem and not an internal PuTTY problem. You can tweak the Windows Registry settings to try and change or address this issue.

For Windows NT, 2000, XP – the registry key to create or change is:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parmeters\TcpMaxDataRetransmissions

It must be of type DWORD. See Microsoft Knowledge Base articles 120642 and 314053 for more information. Set the key’s value to something like 10. This will cause Windows to try harder to keep connections alive instead of abandoning them.

pricethinker.com domain registerd.

Will be moving over my test app from google apps host to here. Cannot live without mysql db. This is my weekend .com startup initiative. This is a AI application which will allow users to compare prices based on quantitative features. The application will be able to predict prices given training data. Also it will identify the best value item from a group. Hopefully plan to release the first fully functional version by end of this year!

Google Web App or Other Low Cost Hosting Service?

I am evaluating if one were to deploy a “weekend” .com project which would be a better choice between google app infrastructure vs regular isp e.g. http://www.ultrawebhosting.com.

Pros of Google Web App
1) Free for certain bandwidth/ disk usage.
2) Integrated dev enviornment with gwt and google apps framework. Integration with eclipse development platform.
3) Scalable/reliable architecture that google uses.
4) Can use gmail based autentication in applications.

Cons
1) No normalized database. JDO based custom database. The query interface is webbased.
2) No support for PHP. Many tools are built on php/mysql platform, that i can get access to on regular hosting service.
3) JVM has restrictions e.g. no multithreaded code, beside the servlet threading itself.
4) Very rigid work flow for application development/deployment. Its both good and bad. Lesser choices are sometime good.

Created my first GWT and Google App

Developing web application and deploying it on google apps was a breeze, (no fighting with javascript). Very developer friendly infrastructure. I started going through the google gwt tutorial at 1 pm today. At this time i have already tested an deployed my very first google apple called stock watcher.

GWT allows developer to code the widgets in plain java. Then the code is compiled into javascript for various browsers. GWT is a cool and easy way of developing ajax enabled applications.

Programming Collective Intelligence Review

I have been reading Programming Collective Intelligence on my daily travel to NY. This is a gem of a book. It covers many topics in machine learning, that can be applied to projects. All with practical examples and code in python. i had no idea that current machine learning algorithm were any useful. But this book puts so much of AI jargon in to practical use. A typical AI book will confuse the heck with the maths proofs and statistics. But this book is pure practical with jucy examples one can easily understand and put to use! Many hip words in AI made some sense to me after reading this book. e.g. Genetic Programming, Genetic Algorithm (yes they are different), baysian classifiers, hiearchical clustering, k-means clustering, optimization, anealing, hill climbing, decision trees, support vector machines.

Some practical algorithms with code and examples covered.
a) Making Recommendations for movies (e.g. similar to Netflix movie recommendation, or matchmaking ).
b) Writing a search engine, and search results.
c) Optimization algorithms. (optimization is finding a good enough solution when the optimal solution is expensive to find).
d) Document Filtring, e.g. Spam Filter
e) Discovering Groups in a large set of data / Clustering
f) Building Price Models e.g. determining the price of a home given a large data with features.
g) Evloving Intelligence. Genertic Programming.