Skip to content

Instantly share code, notes, and snippets.

@jere357
jere357 / main.py
Created November 19, 2023 00:52
extracting green plant columns from the field image
import cv2
import matplotlib.pyplot as plt
import numpy as np
img = cv2.imread("field.jpg")
img_hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
lower_bound = np.array([35, 50, 50]) # lower bound green in HSV
upper_bound = np.array([75, 255, 255]) # upper bound green in HSV
mask = cv2.inRange(img_hsv, lower_bound, upper_bound) # this mask will filter out everything that is not green, green being defined by the lower and upper bounds in the HSV space
@jere357
jere357 / intro.md
Created October 30, 2023 09:00
intro.md

First draft

Introduction

What are generative vision models and how do they differ from other models?

Mathematical models can generally be separated into two large families, generative models and discriminative models. The main difference between discriminative models and generative models is that discriminative models learn boundaries that separate different classes, while generative models learn the distribution of different classes.

Discriminative models can be applied to standard computer vision tasks such as classification and regression,

@jere357
jere357 / intro.md
Created October 27, 2023 23:24
intro.md

Introduction

What are generative vision models and how do they differ from other models?

Mathematical models can generally be separated into two large families, generative models and discriminative models. The main difference between discriminative models and generative models is that discriminative models learn boundaries that separate different classes, while generative models learn the distribution of different classes.

Discriminative models can be applied to standard computer vision tasks such as classification and regression,