Skip to content

Instantly share code, notes, and snippets.

View sunshineatnoon's full-sized avatar

SunshineAtNoon sunshineatnoon

View GitHub Profile
@CasiaFan
CasiaFan / add_local_light_radically.py
Created June 25, 2018 09:03
Add local brightness adjustment radically for image augmentation
import cv2
import numpy as np
import random
from scipy.stats import norm
def generate_spot_light_mask(mask_size,
position=None,
max_brightness=255,
min_brightness=0,
mode="gaussian",
@keithweaver
keithweaver / split-video-by-frame.py
Created May 10, 2017 19:30
Using OpenCV takes a mp4 video and produces a number of images.
'''
Using OpenCV takes a mp4 video and produces a number of images.
Requirements
----
You require OpenCV 3.2 to be installed.
Run
----
Open the main.py and edit the path to the video. Then run:
from PIL import Image
import sys
import os
import math
import numpy as np
###########################################################################################
# script to generate moving mnist video dataset (frame by frame) as described in
# [1] arXiv:1502.04681 - Unsupervised Learning of Video Representations Using LSTMs
# Srivastava et al
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 8, 2024 07:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: