Pitfalls of using Google Colab for Data Collection
By: John Kirchner
Tags: Asl, Python, Data Science, Kaggle, Google Colab

Why use Google Colab?

I recently finished work on a Real-time ASL translator called SigNN with a team of people. Our project required us to collect data from individuals, more specifically pictures and videos of them performing Sign Language characters. With such a system you need to ensure that it will work on everyone’s computer. If it doesn’t work on every computer you then need to spend time editing it slightly for everyone, with a team of five people using that sounds reasonable. But Neural Networks need a LOT of data, so you need a LOT of people, which means spending that time fixing it for every person is a lot less reasonable. Making a program that can work for everyone can be difficult, and seems like an almost insurmountable task, so why not just use something that handles that for you? Colab provides this ideal environment where everyone is using identical computers and setups because they are, Colab uses Google servers so no matter who runs it they are running it on a similar computer as you if not the exact same one. This allowed us to make a photo collection script for static Sign Language characters, but there are motion based characters as well. We needed a video based collection system as well, which proved to be a bit more difficult.

Video… and the lack of it

When you use Colab you are using Google’s servers, which means that if you ask Colab to take a picture it will attempt to do so on a Google Server and not your own computer. This was a major issue for us, as we needed some communication between Colab and the peripherals of our own computers. We ended up finding a solution by using JavaScript. JavaScript allowed us to capture photos on our computer and send it to Colab so that it could use it. And it worked great!… for photos. JavaScript has a limit on how much data you can transfer, and while a photo may be fine, thirty photos a second for three seconds is overwhelming for JavaScript. This is one unfortunate drawback to Colab, it may be uniform with respect to the computing environment, but that uniformity doesn’t allow for peripherals to be used without restrictions.

Ease of Access

Colab does have another upside though, since it is a Google product it integrates with Drive. Since most educational Gmail accounts provide unlimited Drive storage this meant our team had a free database and it was easy to add to and read from Colab. This worked great for our photo database as it meant we had a Drive folder full of photos sorted by date and letter. But this wasn’t all due to Colab, we used the Google Drive API extensively, what Colab handled was authentication, which can be a pain to do on your own. But the unfortunate limit due to JavaScript meant that we had to write a python script and share it with everyone on our team instead.

When to use What

We ended up using OpenCV, while it didn’t completely solved the issue of differing computer environments we found it to be close enough for our project to work. We used this in conjunction with the Google Drive API to write a Video Collection Script that anyone on our team could use. We could have used the same system for Photo Collection as well, but we didn’t. Apart from the fact that we had already written it in Colab, the Photo Collection script worked better in Colab anyways. Colab offered us what we needed for Photo Collection, but not for Video Collection. In the end I believe Colab can be a valuable data collection tool due to ease of access for both users and to the data itself. Colab works best for data collection that doesn’t require peripherals to be accessed or a large amount of data to be transferred if peripherals are necessary.

Want to use the data we collected? Our dataset can be found here. Want to see how we took advantage of this data to make our app? Checkout our GitHub or download our app.