Does Google colab support Video processing?

Viewed 598

I'm running a video processing code to train my model using Detectron2 and Pytorch but the collab session crashes each time. The video file format is .mp4.

2 Answers

From my experience, you can definitely process videos using Colab. Just make sure that you are running a GPU instance and not a CPU or TPU.

  1. Go to Runtime -> Change Runtime Type
  2. Change Hardware Accelerator to GPU
  3. Click Save

enter image description here


As Google Colab provides 12 GB of RAM by default, you can crash the session, and then it offers you 24 GB of RAM for free. I think 24 gigs should be enough for it. This is the code I use to crash my colab instance, whenever I need to process videos. Works like a charm!

import numpy as np
import matplotlib.pyplot as plt

Fs = 800000000
f = 5
sample = 80000000000
x = np.arange(sample)
y = np.sin(2 * np.pi * f * x / Fs)
plt.plot(x, y)
plt.xlabel('sample(n)')
plt.ylabel('voltage(V)')

It supports it. You need to enable the GPU (which is not enabled by default). If you try to crash it, it will simply offer the 'colab pro' option if you want to increase the RAM. Otherwise, it is assigned a default of 12 GB.

Related