Skip to main content

11 posts tagged with "cnn"

View All Tags

CNN 002

· 3 min read

Type of ML Systems

  • Supervised Learning
  • Unsupervised Learning
  • Semi-supervised Learning
  • Reinforcement Learning
  • Batch and Online Learning
    • Whether system can learn on the fly
  • Instance-based and Model-based Learning
    • Comparing data points or detect patterns in training data to build a predictive model

Evaluation Metrics

Interesction over Union (IoU)

IoU

  • a metric used for the evaluation of object detection detectors
  • how good is the predicted bounding box for an object detected closely matches.

IoU=Area of OverlapArea of UnionIoU = \frac{Area\ of\ Overlap}{Area\ of\ Union}

Digital Image

  • made of picture elements (pixels)
  • an array or a matrix of Pixels arranges in columns and rows
  • Each Pixel has its own intesity value, or brightness
  • Intensity values in digital images are defined by bits.
    • 8 bits image = 256 (2^8) intensity values (0-255)
  • Black & White images have a single 8-bits intensity range.

Image Processing Basics

  • Image dimension = 5×5×35 \times 5 \times 3
  • Number of Channels = 3 (Red, Green, Blue)
  • So, 24-bit color dpeth (8 bits per channel)
    • Each pixel has 3 intensity values (R, G, B) each in the range of 0-255
    • Total number of possible colors = 2563256^3 (16,777,216)

Image Processing Types

  • Image Enhancement
  • Image Restoration
  • Image Segmentation
  • Image Recognition & Classification
  • Image Compression
  • Image Transformation
  • Image Filtering
  • Morphological Processing
  • Color Image processing
  • 3D Image Processing

Image Thresholding (Segmentation)

  • Easist method for image segmentation
  • Converts gray-scale image into a binary image
    • f(x,y)<Threshold0f(x,y) < \text{Threshold} \Rightarrow 0 (black)
    • f(x,y)Threshold255f(x,y) \geq \text{Threshold} \Rightarrow 255 (white)

Image Thresholding methods

  • Histogram shape: Peaks, valleys, and curvature of the histogram are analyzed to determine the optimal threshold value.
  • Clustering based: The Otsu method, good for bimodal distribution
  • Adaptive thresholding: Instade of a single threshold, have thresholds for different regions in the image.

Image Transformation

  • Rotation
  • Translation
  • Uniform Scaling
  • Non-Uniform Scaling
  • Reflection
  • Shearing

Edge Detection (Image Filtering)

  • Edge?
    • The points/pixels in an image where brightness/intensities changes sharply.
    • A simple and fundamental tools in image processing and computer vision, useful in feature detection/extraciton
  • Canny Edge detection
  • Sobel Edge detection
  • How to detect edges?

Prewitt Filters

  • Vertical Edge detector: [101101101]\begin{bmatrix} 1 & 0 & -1 \\ 1 & 0 & -1 \\ 1 & 0 & -1 \end{bmatrix}
  • Horizontal Edge detetor: [111000111]\begin{bmatrix} 1 & 1 & 1 \\ 0 & 0 & 0 \\ -1 & -1 & -1 \end{bmatrix}

Sobel Filters

  • Vertical Edge detector: [101202101]\begin{bmatrix} 1 & 0 & -1 \\ 2 & 0 & -2 \\ 1 & 0 & -1 \end{bmatrix}
  • Horizontal Edge detetor: [121000121]\begin{bmatrix} 1 & 2 & 1 \\ 0 & 0 & 0 \\ -1 & -2 & -1 \end{bmatrix}

Morphological Processing

  • Dilation: Shrinks the image pixels from the boundaries of objects in an image, making them thicker.
  • Erosion: Adds pixels to the boundaries of objects in an image, making them thinner.