Logo Detection Using PyTorch-Colab

Nithiroj Tripatarasit
Diving in Deep
Published in
2 min readJul 10, 2018

This article explains how to run the notebook of my previous article-Logo Detection Using PyTorch-by using Google Colaboratory or Colab.

I also add the Colab-version notebook to github. The code is very similar to the original. We only need to implement PyTorch on Colab first.

What is Colab?

Colab is cloud service by Google which let you run Jupyter Notebook in Python with GPU for free. That’s why we need to run on Colab. (more details on faq page)

How to?

  1. You need to have Google account and Google Drive.
  2. Upload Logo Detection Using Pytorch-Colab.ipynb to your Google Drive.
  3. Open file via Right click > Open with > Colaboratory

4. In Colab window , set to use free GPU as default Runtime > Change runtime type and select GPU as Hardware accelerator (make sure we choose Python 3 for Runtime type as well)

5. Install PyTorch 0.4 for Colab

6. Check the result.

7. Now you can run PyTorch notebook in Colab. Enjoy!

Some tips about Colab

  • Sometimes when you got errors, you may need to restart runtime via Runtime > Restart runtime… All local variables will be lost. You have to run cells agin.
  • All files you downloaded store in local directory of Colab virtual machine not in your Google Drive. The files will be deleted when you close the Colab.
  • Colab can run for 12 hours at a time. You just need to restart it.
  • More tips for Colab in this article-Google Colab Free GPU Tutorial

--

--