Skip to main content

16 posts tagged with "ai"

View All Tags

Air Combat Replanning #3: Deterministic JCS & Ed25519 Frag Fix

· 11 min read
Jaybee
AI & Robotics Engineer

This is the third installment in the engineering series on the Air Combat Dynamic Mission Replanning System (SDC). In the previous episode, Air Combat Mission Replanning #2: Stack Spike & Doctrine, we validated the technology stack spike against 6 criteria and structured the operational threat matrix (T1T12) and system bottleneck hypotheses (H1H9) grounded in the ROK 2022 Defense White Paper.

This article documents the engineering work conducted on October 24, 2026, focusing on the M6 messaging and cryptographic security core engine. We address the challenges of ensuring reliable, tamper-proof state synchronization between ground Command & Control (C2) nodes and airborne fighters (F-16C, F-15K) over tactical data links (Link 16). We detail our zero-dependency implementation of RFC 8785 JSON Canonicalization Scheme (JCS) to eliminate cross-runtime (.NET/C# vs CPython) floating-point drift, our raw wire-byte Ed25519 multi-signature envelope architecture, and our resolutions for Defect A-01 (0.7 KB small envelope fragmentation failure) and Defect B-05 (signed delta benchmark distortion).

Episode 3 Cover Diagram Figure 1: RFC 8785 deterministic JCS canonical hashing pipeline, Ed25519 raw wire-byte cryptographic envelope, and Link 16 MTU fragmentation architecture.

Air Combat Mission Replanning #2: Stack Spike & Doctrine

· 12 min read
Jaybee
AI & Robotics Engineer

This is the second installment in the engineering series on the Air Combat Dynamic Mission Replanning System (SDC). In the previous episode, Air Combat Mission Replanning #1: Architecture & KLM Analysis, we established the multi-tier distributed architecture, overcame the CPython 14.5s latency barrier, optimized GPU memory to 0.80 GB, and numerically validated the F-16C fuel integration model via 4th-order Runge-Kutta (RK4).

This article documents the engineering facts from October 23, 2026, when we conducted Technology Stack Spike (a) to de-risk core feasibility before full distributed prototype implementation. We present the verification of 6 quantitative pass criteria, along with the formulation of Operational Threat Situations (T1~T12) and System Bottleneck Hypotheses (H1~H9) derived from official doctrine analysis.

Episode 2 Cover Diagram Figure 1: Architectural overview of Stack Spike (a) verification metrics and the ROK 2022 Defense White Paper-grounded T1~T12 operational threat matrix.

Air Combat Mission Replanning #1: Overcoming CPython Latency & VRAM OOM

· 13 min read
Jaybee
AI & Robotics Engineer

Air Combat Mission Replanning #1 Cover

💡 Executive Summary (TL;DR)

  • The Target: Designing an end-to-end mission-critical software architecture for in-flight dynamic mission replanning (F-16 and F-15E air combat operations), generating and verifying tactical delta packages within 5.0 seconds over tactical data links (Link 16).
  • Real Engineering Pitfalls Encountered:
    1. The 31.4s CPython Search Latency Wall: Pure Python A* graph search over a 100 km × 100 km Digital Elevation Model (10^7 nodes) consumed up to 31.42 seconds (48.0s in ridge lines) due to dynamic object boxing, heap fragmentation, and runtime ray-casting, failing quality standard Q_3(<= 5.0 s).
    2. 8GB VRAM Dual-LLM CUDA OOM Trap: Loading two generative 7B/8B language models simultaneously demanded 11.44 GB VRAM (weights + KV-cache + CUDA overhead), immediately triggering torch.cuda.OutOfMemoryError on single-GPU developer workstations.
    3. Ground-Truth Circularity in Fuel Metrics: Stating a "±1% calculation accuracy" without access to classified military aerodynamic polar tables created an untestable circular definition.
  • Clean Production Fixes:
    1. Pre-baked Viewshed Maps & 2D Manifold A*: Pre-computed radar lines-of-sight into a contiguous 2D float NumPy matrix during scenario loading, combining 2D horizontal A* exploration with analytical altitude clamping to slash search latency to 0.259 seconds (1/20th of the 5.0s budget).
    2. KV-Cache Elimination & 4D Cost-Weight Vectorization: Discarded generative autoregressive text generation in favor of a 0.28 GB encoder (DeBERTa-v3-small) and an MLP predicting a 4D cost vector w ∈ [0, 1]^4, reducing required VRAM to 0.80 GB (90% headroom on 8GB GPU) with zero coordinate hallucination.
    3. RK4 Numerical Ground Truth: Formulated an independent Runge-Kutta 4th Order numerical integration engine calibrated via publicly released Breguet range equations (c0 = 0.131227 hr^-1), achieving a maximum relative error of 3.31 × 10^-5 to mathematically verify Q_2.

[Vision AI] Korean ANPR OCR Engine, Regex Normalization & Temporal Majority Voting (v01 to v11 Evolution) (#5)

· 3 min read
Jaybee
AI & Robotics Engineer

Temporal Majority Voting and Final Confirmation

📌 Key Takeaways (TL;DR)

  • Problem: Single-frame OCR inevitably suffers from transient misreadings (e.g., 64아1511, 24가1511) due to vehicle yaw, glare, and vibration.
  • Solution: Implemented Korean plate regex validation (^\d{2,3}[가-힣]\d{4}$) coupled with a temporal sliding window majority voting engine across a 7-frame buffer (plate_confirm_threshold=3).
  • Result: Advanced through 11 system iterations (v01 to v11), transitioning from initial gibberish (ACCIIXOY-1Z01...) on June 5 to deterministic confirmation of 64가1511 on June 7 with 99.4% reliability.

[Vision AI] Overcoming Blurry Blackbox Artifacts: Deep Super-Resolution (EDSR vs FSRCNN) & Multi-Frame Image Stacking (#4)

· 3 min read
Jaybee
AI & Robotics Engineer

EDSR Deep Super-Resolution Results

📌 Key Takeaways (TL;DR)

  • Problem: Cropped license plates from dashcam footage often measure under 40x20 pixels with heavy H.264 macroblocking; standard bicubic interpolation fails to resolve character contours.
  • Solution: Integrated EDSR_x4 deep residual networks (EDSR_x4.pb) that omit batch normalization to preserve dynamic range, combined with temporal multi-frame image stacking across 3 to 5 consecutive frames.
  • Result: Quadrupled plate pixel density and sharpened stroke edges, lifting downstream EasyOCR accuracy on Korean characters from 32% to over 91%.

[Vision AI] Hierarchical Object Detection: YOLOv3 Vehicle ROI, YOLOv5 Plate Detector & CSRT Tracking (#3)

· 3 min read
Jaybee
AI & Robotics Engineer

YOLOv5 Plate Detection Localization

📌 Key Takeaways (TL;DR)

  • Problem: Searching for tiny plates (30x15 pixels) across the raw 640x480 frame generates massive false positives from roadside signs and drops inference speed below 10 FPS.
  • Solution: Designed a two-stage hierarchical architecture: broad vehicle detection (YOLOv3-tiny) crops the vehicle ROI, within which a fine-tuned YOLOv5 (lp_det.pt, conf=0.6) locates the license plate. Integrated OpenCV CSRT correlation filter tracking with a 15-frame redetection interval.
  • Result: Eliminated 98% of background false positives and slashed GPU overhead by 80%, sustaining real-time 50+ FPS continuous tracking.

[Vision AI] Dynamic Lane Boundary Extraction & Geometric IoU Intrusion Criterion (#2)

· 4 min read
Jaybee
AI & Robotics Engineer

Dynamic Lane Detection Overlay

📌 Key Takeaways (TL;DR)

  • Problem: Dashcam footage contains heavy pavement specular reflection, tar cracks, and road shadows that induce false lane lines; simple coordinate checking cannot reliably catch the exact moment of lane encroachment.
  • Solution: Implemented vanishing-point trapezoidal ROI masking, slope thresholding (|slope| > 0.5), and a 7-frame temporal moving average queue. Formulated intrusion as geometric IoU between vehicle tire footprints and lane boundaries.
  • Result: Filtered out >95% of road texture noise while capturing vehicle lane crossing events with sub-frame accuracy.

[Vision AI] Blackbox Lane Intrusion & Super-Resolution ANPR: 6-Stage End-to-End Pipeline & Real-Time Constraints (#1)

· 4 min read
Jaybee
AI & Robotics Engineer

6-Stage ANPR Pipeline Diagram

📌 Key Takeaways (TL;DR)

  • Problem: Low-resolution dashcam footage suffers from severe vehicle vibration, nighttime backlighting, and heavy motion blur, making direct license plate recognition and lane violation tracking extremely error-prone.
  • Solution: Designed a unified 6-stage vision architecture: Canny/Hough lane extraction -> YOLOv3 vehicle detection -> polygon IoU lane violation calculation -> YOLOv5 plate localization -> EDSR_x4 super-resolution -> EasyOCR temporal voting.
  • Result: Constructed an end-to-end Python pipeline achieving robust vehicle tracking and lane boundary monitoring even under degraded dashcam conditions.

Sim-to-Real RL: Webots to Arduino with ArUco Vision Tracking (#5)

· 6 min read
Jaybee
AI & Robotics Engineer

ArUco Marker Vision Tracking

📌 Key Takeaways (TL;DR)

  • Problem: Severe computational constraints on microcontrollers (Arduino Uno ATmega328P with only 2KB SRAM), non-linear wheel slip, noisy ultrasonic sensing, and the classical Reality Gap between Webots simulation physics and physical hardware.
  • Solution: Designed a distributed I/O architecture (HC-06 Bluetooth at 115,200 baud) where a host PC runs OpenCV vision processing and Q-Table inference while the Arduino handles low-level PWM motor actuation. Overhead camera lens distortion correction and ArUco marker homography (vision.py) deliver sub-centimeter real-time (x, y, θ) tracking.
  • Result: Zero-shot transfer of the simulation-trained 648-state Q-Table achieved an 86.7% target reaching success rate (26/30 trials) in a physical 1.2m × 1.2m arena, successfully closing the reality gap without real-world fine-tuning.

[Webots Robotics] Deterministic Evaluation via evaluate_qlearning & Benchmark vs. DQN and SARSA (#4)

· 4 min read
Jaybee
AI & Robotics Engineer

Success and Steps Benchmark

📌 Key Takeaways (TL;DR)

  • Objective: Measure the pure, deterministic performance of the learned greedy policy (ε=0) without exploration noise, validating real-world deployability.
  • Methodology: Implemented evaluate_qlearning.py running 30 independent trials across 5 round-robin evaluation seeds, rigorously tracking success rates, path efficiency vs. theoretical shortest routes, and obstacle near-miss counts.
  • Result: Tabular Q-Learning attained a 93.3% deterministic success rate in the 12-wall arena with superior path smoothness and ultra-low 0.02ms inference latency, outperforming heavier DQN and SARSA baselines.

[Webots Robotics] Conquering Local Minima in 12-Wall Obstacles: Multi-Seed Headless Simulation (#3)

· 4 min read
Jaybee
AI & Robotics Engineer

obstacle12 Simulation Arena

📌 Key Takeaways (TL;DR)

  • Problem: When a goal lies directly behind an obstacle, the myopic nature of distance-delta rewards (+0.1 × Δdist) pulls the robot into head-on collisions, trapping it in severe Local Minima.
  • Solution: Integrated 3-way head-scan obstacle perception (front/left/right) with long-horizon Bellman value propagation (γ=0.99), alongside an automated PowerShell Webots Headless pipeline (headless_run.ps1) executing multi-seed training across seeds 0, 1, and 2.
  • Result: The agent successfully learned robust detour policies in the 12-wall arena, achieving a 90%+ goal success rate after 600 episodes.

[Webots Robotics] Tabular Q-Learning Implementation & Reward Shaping Tuning (#2)

· 5 min read
Jaybee
AI & Robotics Engineer

Training Reward Curve

📌 Key Takeaways (TL;DR)

  • Problem: Sparse reward setups (+1.0 at goal, -1.0 at collision) cause severe exploration delays, causing the agent to wander or spin for thousands of episodes before stumbling upon the target.
  • Solution: Implemented a multi-objective Dense Reward Shaping mechanism combining potential-based Euclidean distance delta rewards (+0.1 × Δdist) with step (-0.01), turning (-0.01), and backward (-0.05) penalties, paired with exponential epsilon decay (1.0 → 0.05).
  • Result: The moving average reward shifted into a steady positive regime (0.7+) within 500 episodes in the no_obstacle scenario, achieving a 98%+ goal success rate.

[LLM & Backend Engineering #3] FastAPI PostgreSQL 401 Bcrypt Debugging & Evaluation Automation

· 5 min read
Jaybee
AI & Robotics Engineer

Cover Image

Mid-May 2026 was supposed to be a calm interval after wrapping up our 2nd fine-tuning (fine_tuning_2). Instead, May 17th hit our team with a relentless double challenge: condensing hundreds of raw inference metrics into an automated technical report, while simultaneously battling a cryptic HTTP 401 Unauthorized cascading error across our newly integrated FastAPI and PostgreSQL backend.

Here is the complete post-mortem of how we automated our reporting and systematically neutralized the backend authentication breakdown.

[Webots Robotics] Q-Learning Autonomous Navigation: 648-Bin State Discretization & Socket Architecture (#1)

· 4 min read
Jaybee
AI & Robotics Engineer

Webots Simulation Environment

📌 Key Takeaways (TL;DR)

  • Problem: Continuous sensor readings (distance & heading) cause a state-space explosion for tabular Q-learning, and synchronous IPC with the Webots simulator requires low-latency coordination.
  • Solution: Designed a geometrically partitioned 5-dimensional continuous sensor mapper producing 3 × 8 × 3 × 3 × 3 = 648 discrete states (discretizer.py) and a line-delimited JSON IPC socket pipeline over TCP port 5000.
  • Result: Achieved O(1) fast Q-Table indexing and reliable 32ms physics synchronization between the simulator and Python agent.

[LLM Data Engineering #2] Resolving API Rate Limits: Atomic Checkpointing & Resilient Data Synthesis Pipeline

· 4 min read
Jaybee
AI & Robotics Engineer

Cover Image

April 14, 2026, was a masterclass in distributed pipeline fault tolerance. Following our temporary halt from unexpected API expenditure spikes, our team resumed synthetic data generation (v5) to enrich our empathy training set. However, unlocking higher billing tiers immediately exposed our worker scripts to severe rate-limiting (HTTP 429 Too Many Requests), partial file corruptions, and pipeline stalls.

Here is how we re-engineered the synthesis architecture into a self-healing, unmanned autonomous pipeline.

[LLM Data Engineering #1] Full-Scale Data Preprocessing: Llama 3.1 Chat Template & JSONL Pipeline

· 4 min read
Jaybee
AI & Robotics Engineer

Cover Image

April 1, 2026, was the day our engineering team launched the automated preprocessing pipeline for the massive counseling corpora that would form the foundation of Maeumjigi. Training a high-performance open-source Large Language Model (LLM) like Meta Llama 3.1 requires rigorous data hygiene: converting unstructured multi-party dialogues into clean, token-bounded, and special-token-aligned instruction datasets.