Rico's Nerd Cluster

「离开世界之前 一切都是过程」

Computer Vision - Harris Corner Detector

Do Not Cut Corners on Corner Detector - It Will See It

Basic Idea When a specified window truly has a corner, if we shift a window (region of interest) along any direction (+/- x or y direction) slightly by small displacements, $u$, $v$, we could expe...

Computer Vision - Warping

Affine Transformation, Perspective Warping, Non-Linear Warping.

Introduction Warping is a process to transform pixels to another shape using a mapping function. There are three kinds of warping: affine warping, perspective warping, and non-linear warping. They...

Computer Vision - Non Maximum Suppression

Non Maximum Suppression (NMS), Intersection over Union (IoU), TensorFlow non_max_suppression

In image classification, we often get many bounding boxes of the same object in a small subarea. Non Maximum Suppression (NMS) can help us pick which boxes we want to keep. Inputs: Bounding bo...

Computer Vision - Blurring

Gaussian Blurring (Under Active Updates)

Gaussian Blurring TODO OpenCV Implemenation 1 2 3 4 5 6 7 8 9 10 def get_gaussian_kernel(size:int): """ We're not sure the padding rule of cv2.GaussianBlur - Technically applying the id...

Git - Workflows

Git Test Runners, CI/CD, PyPi

Local Git Repo Setup Copy ssh key to Github Set up email and username: 1 2 git config --global user.name "Your Name" git config --global user.email "your_email@example.com" Set Up Github ...

Python - Numpy View and Contiguous Array

View

What is np.view When slicing or transpose takes place on an array, we actually get a np.view object that shares the underlying memory with the array. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...

Python - Numpy and Pandas Operations

A Mumbo Jumbo Of Numpy and Pandas Operations and Examples

Numpy General Programming Rules In Numpy np allocates memory like C, so it’s contiguous. Math operations can be applied to all elements, which is a lot faster than for loop and use math modu...

Python - Python Packaging System

Packaging

Setuptools Entrypoints Entrypoints are a way to specify components in your package to the rest of the python space, so they can be dynamically discovered. So this enables: Console scripts (co...

Python - Poetry Packaging System and Pip

Poetry, Pip

Introduction Using Poetry is highly recommended because it simplifies dependency management and packaging, even when not using virtual environments. Environments without Poetry can install poetry ...

Python - How To Write Pytest

Pytest Is The New Black (Compared To Unittest)

Run Pytest Run a specific test file pytest path/to/test_file.py Run a test in it: pytest path/to/test_file.py::test_function_name Assert For integer assertions: 1 assert (1==1) F...