Posts

How a Neural Network is like Munna Bhai & Classifying the Largest Number

Image
It took me a good week or so after going through the first 3 videos of the FastAI course for it to click in my head as to what was going on in a neural network. And now, the basics feel very foolish. On the side the past few weeks, I've been doing algorithmic and data structure problems for fun*, and I thought it might be fun to see if a neural network could solve some of these problems.

And so, I started out with trying to predict the largest continuous sum in an array.But to define it better, I'd make sure the array only had 100 numbers.But 10 numbers are easier for me to visually see. And so, the array would only have 10 numbers.Shortly after I realized that debugging this would take me too much time, and so I had to think of an easier problem.Okay, how about finding the largest number of a list.But, a regression problem is most likely going to give random numbers, and I'll have to use silly metrics likeRMSE which don't make too much sense in a question like this.An…

What 3 Weeks of Deep Learning Have Taught Me

Image
I've almost completed the FastAI course for deep learning, and here's a list of things I've learnt:
Deep learning is far from magic. So far I was convinced there was more to deep learning than just matrix multiplications and 11th-grade math. 3 weeks haven't shown me the signs.It's hard, or it feels like magic because humans struggle to visualize beyond 3D space.And so, for my first project, I made a simple classifier that predicts the maximum number from a list of 2 numbers. This can be visualized in 3D. More on why I did this in another blogpost, but in 3 lines here's what I learnt:
The truth is, you'll never really know if you should be happy with your output. That's because don't always know if you've reached the most optimal solution to a problem. It'll take your computer way too long to go check every value possible.It's very important that you use big long words that sound impressive otherwise normal people will think they can do it…

A Deep Learning Classifier for FIFA vs Real Football

Image
FIFA or Not? Try it out on www.rish.space/fifa-or-real


I took up the FastAI course a week ago to finally do some hands-on,state of the art, 10-lines-of-code-does-it-all deep learning. I took up many courses in college, joined Kaggle a good 4 years ago (sigh - the only problem I ever solved was the Titanic dataset and honestly didn't find it as fun as making an Android app), and now that I've made up my mind to do more DL, I want a taste of a regular deep learner engineer's everyday job. More on that later, this post is just about identifying whether an image is from FIFA or not.

Here's the why:
I've played FIFA all my life, starting with FIFA 2001 on my PlayStation2. By the time FIFA06 came out, my father used to say it was hard to make out from afar whether I was playing or watching football on TV. And so, I thought it'd be fun to see if a computer could do this.

What I did:
1. Ran a script to scrape URLs of the top 200 images on Google Images for FIFA, and ano…

Django for Productivity. Flask for ...?

Image
Django vs Flask. I decided I'd code up an oversimplified blogposting platform to see what works better for an application of medium scale and say 10K hits a day. I Googled a whole lot, and though there are nice diagrams people have made, you never really know until you try both. This has been on my to-do list for a good 18 months and I finally have an answer.

Flask for scalability, they said. Will you really need that scale they never asked. Flask for flexibility, they said. Are you mature enough for designing your own structure they never asked. Django for productivity, I say.  Django unless you want to make all-code-on-one-page simple AWS Lambda like API. Django for almost all medium-large scale webapps you'll ever need. Django all the way.
Truth be told, Flask is easy to learn. Literally, all you do is put an annotation above a function and you have a HTTP endpoint. The "overhead/heavyweight" Django gives you everything you'll really need maybe 1-3 months down…

I'm now an Estonian eResident!

Image
Lifehacks is doing great.
I make money off of it.
And so I pay heavy taxes in India.
In return, I receive terrible infrastructure and pay extra for private services.

Estonia on the other hand, a country far far away wants to help me set up a startup, all digitally without me ever having to physically be there.
I don't have to pay taxes if I re-invest.
Starting a company is honestly one click, €1,000 in the bank, and one flight to Delhi away.
Why wouldn't I?

Plus it feels pretty cool to login with a key card :D

Waiting on an idea

Image
Chatur:
What's he doing?

Narrator:
The 22-year-old was sitting in an oddball position - lying on his back with his legs pinned against the wall forming a right angle.

Chatur:
He has been acting weird all year, says he's waiting for an idea to pop out of thin air. This pose apparently rushes blood to the head, and that's supposed to get the brain working. Doesn't seem like it's working!

Narrator:
The young man had seen it on Power Rangers Time Force as a child. The green ranger would handstand to have blood circulate in his head to think. And he probably thought if it worked for the ranger, it most definitely should have worked for him.

Chatur:
This is the least of his crazy ways though! Earlier this year, he went on a month long vacation with a $30 Nokia phone to call back home because constant interruptions might disturb his flow of thought.

Our character of concern on a month long break! Narrator:
But how'd that work out for him you ask? Well, the 22-year-old came…

New year, New Project!

Image
Ah! I'm working on a fantastic new idea, and I am so happy about it.
Months ago, during depressing November when the winter gloom struck me hard, I wrote a draft named Waiting on an Idea. I never published it because it wasn't good enough. Everything that I was doing then just didn't seem good enough. The people I was around, the work I was doing, my side projects, nothing seemed worth my time. And so, I tried writing a comical blog on me doing all the strangest yoga poses and sideway handstands, eagerly waiting for an idea to magically pop in my head to turn my life around. But the blog post wasn't good enough, and so I just left it as a draft.

Quite literally me waiting on an idea.
Another 50 blog post drafts ago, I wrote about a novel interface to using your phone; now I didn't suggest what it would be, but I just knew if there is a new way to interact with your phone, you have a sure shot at the millions. And the idea has finally shown itself!

Now, in a parall…

Level Unlocked: The right side of Bangalore Airport

Image
As a child I used to love playing first person role playing games on my Play Station. My favorite of all of them was The Simpsons: Hit and Run. You're in the Simpsons world and you take on the role of any of the Simpsons characters at various levels. You start off with a limited world map; you're restricted from entering future level areas, and if you try to cross those with your player, all he does is run in place blocked by an imaginary transparent wall. As you progress, more and more of the map opens up and what was once an imaginary wall is now an area you can freely roam in.

The invisible barrier. Precisely this.
Post Baggage Drop and taking the escalator to have a security check, Bangalore's right side of the airport is the International airport - a part of my world's map that I just couldn't enter up until yesterday. For two years I've taken the left turn right after baggage drop and have looked at the right with a little sigh - knowing that I will some d…

If I ever start a hardware company

Image
.. I won't. I'm certain I won't. tl;dr, this just a rant of a whole lot of glaringly obvious mistakes we've made at the two product companies I've worked at.

Hardware is hard because:
there's no version control. You can't go back in time to checkout what's changed since it was last working yesterday night.it takes time to fail. It's hard to simulate time. Imagine testing a battery - you really can't do anything but wait for it to run it's course through time to see if it works in the long run. And also because your work place always looks like this.
But if an idea comes up that motivates me enough to do it, here's a list of things to take care of. These are actually pretty obvious in hindsight, it's hard to see how I've seen companies mess it up, twice.
All this assumes you have a market already, and the problem isn't acquiring customers, but figuring the tech out. For most companies, I'd argue the problem is the other wa…

Two years at Tonbo Imaging

This year, compared to last year has been a lot more of software development and making the cameras a finished product - a device that can be sold with the highest quality standards. If you've worked on taking a proof-of-concept stage demo unit to a high-grade production ready, you'd know how time-consuming this is.
Media Libray for Android - Lib Graf
This is probably the company's first Media Library. A lot of the older systems use the same code copy-pasted from one git repository to another for media streaming or creating viewer applications with minor changes for different products. This a step towards stopping that and is specifically for Android devices. Works on Android Handheld and Wear devices.
Read more at rish.space/projects/lib-grafCamera SDK & Camera-Client Architecture
Tonbo has made over 50 different camera devices ranging from 80-pixel tiny cameras to handheld units to ones that go on helicopters. There's a lot of similar code over dozens of repositorie…