Computer Vision meets Fish Tank

One day I got curious… what if I programmed my computer to track the fish swimming in my fish tank? That led me to tinkering with an open source software library called OpenCV. I fiddled around with the settings, tried a few things, and saved the output as a video, seen below. There’s a lot of research in computer science around object recognition and identification … this mini-project was just an attempt to have some fun poking around with some “older” computer vision technologies. Let me know what you think!



Python API to


Approximately 10% of American households have fish as pets.
It is estimated that 95% of fish deaths can be attributed to improper housing or nutrition. Many times fish are sold or given away without any guidance to the new pet owner, such as goldfish giveaways at carnivals or at birthdays. Some fish have myths associated with them, such as the betta fish (siamese fighting fish) that supposedly can live in dirty water in small bowls. is a website that helps aquarists plan how to stock their fish tank. Users specify their tank size, their filtration, and what fish they intend to keep in the tank. The site will calculate the stocking level and filtration capacity given the inputs. This is a useful tool to get a rough estimate on a fish tank’s stocking level, it even lets you know whether the fish are compatible with one another, if you have more than one species in the tank. AqAdvisor is sometimes criticized for “not being accurate”, so the output generated should be not be treated as gospel; nonetheless, it gives a reasonable starting point, and is generally very useful for beginner fishkeepers.

Why I created this tool

I started using AqAdvisor and got annoyed at the archaic design. It’s not a RESTful API, it’s a clunky web site that takes a while to load. I was doing lots of research and found myself wanting a better useful experience. I also had some free time on my hands one long holiday weekend so I decided to give myself a little programming exercise of creating a python API to the site.

How to use the tool

The easiest way to use the tool is to use the ipython notebook as a starting point. First, create a stocking, then a tank, and then make a call to the AqAdvisor service. Because of the clunky web interface, multiple calls to must be made if you want to have more than one fish species in a tank (as is would be the case for a community tank). The auto-generated AqAdvisor URL will be printed for each call out to the website. This is useful in case you want to jump over to the web UI, you can just copy and paste the URL into your web browser and continue from there.

Use the common (English) name for the fish you are looking for. PyAqAdvisor will do a “fuzzy match” to AqAdvisor’s species list and match the closet one. This way you can specify your stocking list as “cardinal tetra” and not worry about the scientic name.

Please look at examples/ and examples/example.ipynb for more information.

Here’s an example of how easy it use the new API:

from pyaqadvisor import Tank, Stocking

if __name__ == '__main__':

  stocking = Stocking().add('cardinal tetra', 5)\
   .add('panda cory', 6)\
   .add('lemon_tetra', 12)\
   .add('pearl gourami', 4)

  print "My user-specified stocking is: ", stocking
  print "I translate this into: ", stocking.aqadvisor_stock_list

  t = Tank('55g').add_filter("AquaClear 30").add_stocking(stocking)
  print "Aqadvisor tells me: ",
  print t.get_stocking_level()

Github Repo: PyAqAdvisor


  • PyAqAdvisor currently only works for freshwater fish species. If you are interested in saltwater fish, please contact me.

ARO Mobile – Finally “truly intelligent” smart phone software…

Here’s an idea my friends and I have been kicking around for a while… turns out another bunch of (well-funded, well-connected) people have been secretly working on this in the meantime….

So what is Aro? Currently, it’s a piece of software that runs on top of Google’s mobile Android OS. But it’s not just another layer like some of those awful skins that OEMs design for Android. Instead, it weaves itself into the OS and uses AI and machine intelligence to make sense of what you’re doing with your phone. It natively ties into your email, phone, calendar, address book, and browser to make them potentially much more useful to you when you’re on the go.

Maybe someone sent you an email mentioning an address, the Aro system can recognize that and with the click of a button give you all kinds of actions you can do with it. The same is true with names — of both people and companies. And dozens of other things.

Read more at Techcrunch

David Beach's Blog: Developing for Android

Like it or not, Android is huge. Creating an open source mobile platform was one of the smarter things Google has done. It's too bad that they haven't done that great of a job doing it. Android has succeeded despite Google. In fact it's safe to say that Android is successful for one primary reason. The iPhone is only available on AT&T. If the iPhone was on Verizon a year ago. Android would be no where near as popular. But since this has yet to happen, Android has become a huge market that isn't going away.

via David Beach’s Blog: Developing for Android.

Android will be huge, especially in international markets such as China.  Time to start cranking out some Android apps!

GDC 2010: Ngmoco's Neil Young on how freemium will change the App Store world

interesting article on freemium model for mobile app development

He and his company decided that an app was a trade with customers — customers would pay money to have the company fill out their free time. And that’s how the company attached itself to the concept of DAUs.

DAUs, explained Young, are “daily active uniques” — all of the people who log into an app to play with it daily, the number of unique users per given day. The company is also interested in dollars (actually cents) per DAU, or the average number of cents earned per daily user. 250,000 users may play your free app every day, but only 2% may actually pay for it using in-app purchases. If that money total equals $5000, Young said that's like 2,000 users (the average number of downloads for the top list of paid apps at the time) buying your app for $2.50. In short, you don’t need to have a paid app at all — you just need to monetize usage for that 2%.

via GDC 2010: Ngmoco’s Neil Young on how freemium will change the App Store world.