Skip to content

Instantly share code, notes, and snippets.

Avatar
🚄
Riding the category theory hype しんかんせん!

Mateen Ulhaq YodaEmbedding

🚄
Riding the category theory hype しんかんせん!
View GitHub Profile
@YodaEmbedding
YodaEmbedding / README.md
Last active May 6, 2022
CompressAI Pytorch Lightning
View README.md

CompressAI Pytorch Lightning example

@YodaEmbedding
YodaEmbedding / .clang-format
Created Jul 29, 2021
.clang-format for Rust style (rustfmt)
View .clang-format
AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@YodaEmbedding
YodaEmbedding / example.py
Last active Apr 20, 2021
Please see appendix (attached in the Canvas comment) for usage instructions
View example.py
# example.py
from common import setup
import torch.nn.functional as F
args, model, data_module = setup()
test_data_loader = data_module.test_dataloader()
for batch in iter(test_data_loader):
inputs, targets = batch
@YodaEmbedding
YodaEmbedding / blockmatching.py
Created Feb 7, 2021
Block-matching motion vector estimation in python
View blockmatching.py
import numpy as np
import numba
@numba.jit(nopython=True)
def estimate_flow_blockmatching(prev_img, next_img, block_size, search_window):
"""Estimate motion vectors using block matching.
Args:
prev_img: previous frame