Tuesday, October 11, 2016

Hugo Larochelle's neural network & deep learning tutorial videos, subtitled & screengrabbed

Like a lot of data scientists (I consider myself more of a data spelunker, but I aspire to data science), I try my best to keep up with the latest discoveries in a very fast-changing field; and probably nothing has been as game-changing as the advent of deep learning.

Deep Learning, explained to a five-year-old (okay, maybe fifteen-year-old): Data science been really good for a while now at data that can be explained in Excel spreadsheets, i.e. columns and rows: one row per observation, one column per variable. This is called structured data. Deep Learning allows us to create rows of column variables that describe a representation of unstructured data, like images or text. It's as if you had an automatic algorithm that could look through all your images, and create one column based on the likelihood the image contains a cat, another the likelihood it contains a shovel -- without having to tell the algorithm what a cat or shovel is, or what they look like, or determine that there are cats and shovels at all before running the algorithm.
Deep Learning is rather math-intensive, and involves neural networks, a family of algorithms that's been around for a long time but has now come into its own. Unlike some skills, you can't learn it as a black box and then slowly come to understand it as you use it. There are foundations you need to acquire; tutorials you need to absorb.

I live in Montreal, which recently hosted its annual Deep Learning Summer School; I couldn`t attend, but I heard great things about the lecture by Universit√© de Sherbrooke's Hugo Larochelle.

There's just one thing; I hate listening to videos. It's why I don't take Coursera classes now that I only have a short commute to work every day. I need to learn at my own pace. And I prefer to read.

So when I realized Larochelle's lecture was based on a series of 92 videos on his YouTube channel, I wrote a Python script to add a black bar beneath them, burn subtitles into it, and take screenshots of every subtitle slide and make a pdf out of it so I can read them. I like to read.

Here's an example screenshot:

I'm sharing the fruits of my labor with you here: Videos with subtitles, pdfs of subtitled screenshots, and Python code I used to make them.

Hugo Larochelle neural network lecture videos
& pdfs with subtitles

These are zip files of subtitled videos and pdfs of screenshots made from Hugo Larochelle's (University of Sherbrooke) YouTube playlist of 92 videos in 10 parts on neural networks.

Videos with subtitles:

  1. Subtitled MP4s for Part 01, Feedforward neural networks [zip, 108.5 MB]
  2. Subtitled MP4s for Part 02, Training neural networks [zip, 238.6 MB]
  3. Subtitled MP4s for Part 03, Conditional random fields [zip, 250.2 MB]
  4. Subtitled MP4s for Part 04, Training CRFs [zip, 106.6 MB]
  5. Subtitled MP4s for Part 05, Restricted Boltzmann Machine [zip, 169.1 MB]
  6. Subtitled MP4s for Part 06, Autoencoder [zip, 136.8 MB]
  7. Subtitled MP4s for Part 07, Deep Learning [zip, 226.8 MB]
  8. Subtitled MP4s for Part 08, Sparse coding [zip, 152.8 MB]
  9. Subtitled MP4s for Part 09, Computer vision [zip, 191.4 MB]
  10. Subtitled MP4s for Part 10, Natural Language Processing [zip, 289.5 MB]

PDFs of screenshots:

  1. PDFs for Part 01, Feedforward neural networks [zip, 120.9 MB]
  2. PDFs for Part 02, Training neural networks [zip, 287.0 MB]
  3. PDFs for Part 03, Conditional random fields [zip, 284.2 MB]
  4. PDFs for Part 04, Training CRFs [zip, 132.7 MB]
  5. PDFs for Part 05, Restricted Boltzmann Machine [zip, 189.8 MB]
  6. PDFs for Part 06, Autoencoder [zip, 161.1 MB]
  7. PDFs for Part 07, Deep Learning [zip, 307.9 MB]
  8. PDFs for Part 08, Sparse coding [zip, 200.9 MB]
  9. PDFs for Part 09, Computer vision [zip, 239.8 MB]
  10. PDFs for Part 10, Natural Language Processing [zip, 371.6 MB]

In a Python script (which you can see here: Part 1, Part 2), I:
  • used requests and BeautifulSoup to parse the YouTube playlist;
  • used youtube-dl to download the videos and WEBVTT subtitles;
  • used pycaption to convert subtitles to SRT format;
  • used ffmpeg (from a subprocess call) to add a black letterbox below each video, burn the subtitles into that box and then save png screenshots wherever there was a new subtitle line;
  • used imagemagick to bundle pngs into pdfs;
  • used zipfile to zip similar files together and deleted the originals.

I'm David Taylor, aka prooffreader. About me

• • •