Fading Coder

One Final Commit for the Last Sprint

Implementing the Kannala-Brandt Fisheye Camera Model in C++

While studying the ORB-SLAM3 source code, I recreated and refactored its camera model implementation. A key discovery was that despite both pinhole and fisheye cameras having distortion parameters, the fisheye model cannot use cv::undistort for correction. After visualizing the depth-normalized plan...

Data Loading and Preprocessing Logic in the Lift-Splat-Shoot Architecture

Dataset Initialization and ConfigurationThe data pipeline begins by instantiating the NuScenes API to manage scene metadata. The SegmentationData class orchestrates the separation of training and validation splits. It invokes logic to generate lists of scene tokens, separating them based on predefin...

Computer Vision Fundamentals

Homework 0: Basic Image Manipulation This homework focuses on fundamental image processing operations such as resizing, rotating, and basic transformations. Image Resizing Resizing an image involves changing its dimensions. One common method is nearest neighbor interpolation, which simply copies the...

Visualizing Positive Sample Selection in YOLOv5

Understanding the process of positive sample selection is crucial for YOLOv5. This guide demonstrates how to visualize these selected samples across different scales to gain deeper insight into the underlying mechanism. Visual Outputs When visualized, the positive sample selection process reveals se...

Building a Convolutional Neural Network for MNIST Classification with PyTorch

Preparing the MNIST Dataset The MNIST dataset consists of 28×28 grayscale images of handwritten digits, split into 60,000 training samples and 10,000 test samples. We use torchvision to download and transform the data. import torch from torch.utils.data import DataLoader from torchvision import data...

Real-Time Driver Fatigue Monitoring System Using Dlib and Facial Landmark Analysis

Developing a real-time fatigue detection system is a critical safety application in computer vision. This implementation utilizes facial landmark detection to monitor physical indicators of exhaustion, specifically focusing on eye closure patterns (EAR), yawning frequency (MAR), and head pose stabil...

OpenCV Data Structures

1. Classification Basic Data Types Helper Objects Large Array Objects: Mat STL Data Structures: vector, pair 2. Basic Data Structures: Point, Scalar, Size, cv::Rect, RotatedRect, Matx 3. Point 3.1 Point Construction cv::Point2i p; // 2D integer point, e.g., (x, y) cv::Point3f p; // 3D float point, e...

Reading and Saving Videos with OpenCV-Python

Video content can be sourced from two primary places: pre-recorded local files, or real-time streams from capture devices like computer webcams or phone cameras. OpenCV-Python uses the same core API to read both types of video, with only the input parameter changing to switch sources. Reading Video...

Building a Padding-Equipped U-Net for Biomedical Image Segmentation

U-Net, formulated by Ronneberger et al. in 2015, adopts an encoder-decoder framework with skip connections to fuse high-resolution feature maps from the contraction path with upsampled outputs in the expansion path. The architecture excels in tasks requiring precise localization, such as biomedical...

Multimedia Processing and Debugging with OpenCV, PIL, and IPython

Negative Log-Likelihood Loss Mechanics The nn.NLLLoss criterion evaluates classification performance by measuring the negative log-probability assigned to correct classes. Given unnormalized model outputs $z$, the loss first applies the log-softmax operatino: $$\text{log-softmax}(z_i) = z_i - \log\s...