Skip to content

Instantly share code, notes, and snippets.

@AlphaAtlas
AlphaAtlas / GetTrainingImages.vpy
Last active November 1, 2021 12:09
Grabs 1 frame from each scene in a list of videos, downscales them using CUDA or SSIM_downsample, writes images to disk. Useful for getting training data!
#Grabs 1 frame from each detected scene in a list of videos
#Downscale it with the highest possible quality, and write the full frame and image to disk
#Useful for getting training data from videos!
#Requires python, vapoursynth, muvsfunc, and mvsfunc, knlmeans, dpid, mvtools
#Or better yet, just unzip this: https://github.com/theChaosCoder/vapoursynth-portable-FATPACK/releases/tag/r2
#Just benchmark this script under the script tab in VSEdit.
#Or run 'vspipe "Path/To/NameOfScript.vpy" .'
import mvsfunc as mvf
@rdinse
rdinse / Google_Colaboratory_backup.py
Created March 13, 2018 22:55
Simple Google Drive backup script with automatic authentication for Google Colaboratory (Python 3)
# Simple Google Drive backup script with automatic authentication
# for Google Colaboratory (Python 3)
# Instructions:
# 1. Run this cell and authenticate via the link and text box.
# 2. Copy the JSON output below this cell into the `mycreds_file_contents`
# variable. Authentication will occur automatically from now on.
# 3. Create a new folder in Google Drive and copy the ID of this folder
# from the URL bar to the `folder_id` variable.
# 4. Specify the directory to be backed up in `dir_to_backup`.