# Aasman Bashyal: complete public portfolio

This file contains the biography, web resume, project articles, writing, gallery links, and the dated current-work note. The resume PDF contains additional projects and teaching experience. Images, videos, and PDFs are linked rather than embedded as binary data.

Canonical portfolio: https://aasmanbashyal.com.np/
Short index: https://aasmanbashyal.com.np/llms.txt

Profile reviewed: 2026-10-23. Article publication dates appear with their source documents.

Source Markdown: https://aasmanbashyal.com.np/about.md

# About Aasman Bashyal

Canonical: https://aasmanbashyal.com.np/about/

Research & AI Architect at [Angelswing](https://angelswing.io/). Remote.

Employer location: Seoul, South Korea.

I am a Research and AI Architect at Angelswing. I work on problems in computer vision, AI, GIS and deep learning.

I work remotely for Angelswing, a company based in Seoul, South Korea. My current work spans multimodal hazard detection systems, 360° panorama processing, indoor 3D reconstruction using NeRF and Gaussian Splatting, and real-time scene segmentation for geospatial applications.

Before joining Angelswing, I spent most of my time in robotics clubs at Pulchowk Campus building robots for ABU Robocon, where our robots earned the Tokyo Electron Award (Fiji, 2020) and the ROHM Award (Mongolia, 2019). That early experience in embedded systems, sensor fusion, and building things that physically move shaped how I approach software today: with a bias toward making things work under real-world constraints.

I hold a Bachelor's in Electronics and Communication Engineering from IOE, Tribhuvan University. Contact me about research or collaboration.

## Contact

[Email Aasman Bashyal](mailto:bashyalaasman@gmail.com)

[GitHub](https://github.com/aasmanbashyal) · [LinkedIn](https://www.linkedin.com/in/aasmanbashyal/) · [YouTube](https://youtube.com/@aasmanbashyal)

[Projects](https://aasmanbashyal.com.np/projects.md) · [Writing](https://aasmanbashyal.com.np/blogs.md) · [Resume](https://aasmanbashyal.com.np/resume.md)

---

Source Markdown: https://aasmanbashyal.com.np/resume.md

# Aasman Bashyal's resume

Canonical: https://aasmanbashyal.com.np/resume/

Research & AI Architect at [Angelswing](https://angelswing.io/). Remote.

Employer location: Seoul, South Korea.

This web resume lists selected experience. The full PDF also includes projects, leadership and teaching.

[Resume PDF](https://aasmanbashyal.com.np/pdf/resume_aasman_20261104.pdf)

## Research experience

### Research & AI Architect

Angelswing · Remote · Jun 2022 – Present

- Researching and developing a multimodal hazard detection system for drone imagery, combining RT-DETR with Vision LLMs alongside an agent-based verification framework using LLM-as-a-judge validation.
- Engineered a 360° panorama sky inpainting pipeline using LaMa, optimizing the zenith transformation algorithm to reduce 8K image processing time by 92% (from 5s to 400ms).
- Developed a 360° indoor navigation system using Visual SLAM based on stella_vslam to generate keyframes and trajectories from 360° timelapse videos. Integrated YOLO-based face detection to automatically blur workers and camera operators in equirectangular images for privacy protection.
- Researched 3D indoor scene reconstruction using Neural Radiance Fields (NeRF), Gaussian Splatting, and Structure from Motion (SfM) techniques.
- Shipped Auto Polygon for measuring stockpiles on drone maps. Converted MobileSAM (Segment Anything) to LiteRT with 16-bit decoder weights. A cached correction took 0.94 s in a WebAssembly benchmark.
- Created architecture for 3D terrain model editing MVP, optimizing performance to achieve 1-3 second response time.
- Developed a snapping feature for Computer-Aided Design (CAD) overlay, improving the precision of measurement tools.

### Research Engineer Intern

KIAS · Lalitpur, Nepal · Apr 2021 – Sep 2021

- Designed portable solar-powered ESP32 weather station for real-time data collection.
- Integrated sensors for meteorological data, enhancing accuracy with Kalman filtering.
- Applied XGBoost and random forest models for weather forecasting.

### Robotics Engineer

Pulchowk Campus, IOE, T.U. · Lalitpur, Nepal · Nov 2017 – Oct 2021

- Led 21-member embedded and robot navigation team for ABU Robocon 2020, Fiji, and worked as a student team member for ABU Robocon 2019, Mongolia, and ABU Robocon 2018, Vietnam.
- Developed semi-autonomous navigation system for a four-wheel omni-drive robot, overseeing the integration of LiDAR, encoders, and IMU sensors.
- Engineered custom boards including motor drivers, and STM32-based development boards. Created additional function-specific boards (e.g., Schmitt trigger, pneumatic control).

## Education

### Bachelor of Electronics and Communication Engineering

Pulchowk Campus, IOE, Tribhuvan University · Lalitpur, Nepal · Nov 2017 – Apr 2022

## Awards and scholarships

- Tokyo Electron Award (2020): Outstanding robotic design, ABU ROBOCON, Fiji.
- ROHM Award (2019): Technical innovation in circuit design, ABU ROBOCON, Mongolia.
- Best Shuttlecock Award (2018): Innovative mechanism design, ABU ROBOCON, Vietnam.
- Winner, SDG Health Category at LOCUS: Smart Baby Cot for infant care.
- Mahatma Gandhi Scholarship: Received from the Indian Embassy for academic excellence in high school.

## Skills

- Languages and web technologies: Python, C, C++, MATLAB, Go, SQL, HTML, CSS
- Libraries and frameworks: PyTorch, TensorFlow, OpenCV, NumPy, scikit-learn, FastAPI, MLflow, Agent Development Kit
- Tools and infrastructure: AWS (EC2, S3, Lambda, RDS), Docker, Git, PostgreSQL, Kubeflow, Grafana
- GIS & Embedded Systems: QGIS, GDAL, Embedded C, KiCad, Proteus, STM32CubeMX, Keil µVision, Arduino, ROS, Raspberry Pi

## Contact

[Email Aasman Bashyal](mailto:bashyalaasman@gmail.com)

[GitHub](https://github.com/aasmanbashyal) · [LinkedIn](https://www.linkedin.com/in/aasmanbashyal/) · [YouTube](https://youtube.com/@aasmanbashyal)

---

Source Markdown: https://aasmanbashyal.com.np/projects/polygon.md

# Automatic Polygon Drawing

Surveyors can outline stockpiles directly on a drone map. I used weight quantization, a technique from TinyML, to shrink existing segmentation models for local inference with WebAssembly.

Canonical: https://aasmanbashyal.com.np/projects/polygon/

Category: Computer vision

Angelswing released Auto Polygon for 2D drone maps in September 2026. A surveyor clicks inside a stockpile to get its outline, then clicks any ground the model included by mistake. The resulting polygon stays editable for measurement.

[Watch video: Selecting and measuring stockpiles with Auto Polygon](https://www.youtube.com/watch?v=7PYj8kf3-sI)

## Two clicks, two timings

The first click pays for encoding the aerial image. On the second click, MobileSAM and EfficientSAM can reuse that encoding and run just the mask decoder. Timing the clicks separately captures the wait to start drawing and the wait to make an edit.

I benchmarked the browser worker on a fixed aerial image in July and August 2026. Each run used one click inside the target and one outside it. Timings start after model preparation. A result passed only if the final polygon contained the first point and excluded the second.

## MobileSAM in production

I converted MobileSAM's pretrained image encoder and mask decoder to LiteRT for the browser. The production pair keeps the encoder at 32-bit precision and stores the decoder weights in 16 bits. It matched the reference masks on five test prompts and passed the two-click polygon check on both backends.

| Browser backend | First outline | Cached correction |
| --- | --- | --- |
| WebAssembly (CPU) | 6.95 s | 0.94 s |
| WebGPU (GPU) | 5.28 s | 0.11 s |

## What quantization changed on WebAssembly

To isolate the effect of weight precision, I converted the pretrained EfficientSAM-Ti encoder and decoder to LiteRT, checked their outputs against PyTorch, then quantized the weights. The model inputs and outputs stayed 32-bit floats. All three versions ran on the same WebAssembly backend and passed both click checks.

| Weights | Model files | First outline | Correction |
| --- | --- | --- | --- |
| FP32 | 45.5 MB | 16.03 s | 0.45 s |
| FP16 | 25.3 MB | 24.04 s | 1.00 s |
| INT8 | 15.5 MB | 11.76 s | 0.44 s |

INT8 saved 30 MB of model files and about four seconds on the first outline. FP16 also reduced the download, but took eight seconds longer than FP32 to draw the same pile.

## Model selection

The feature shipped with the converted MobileSAM pair as an option. EfficientSAM-Ti remained the default through ONNX Runtime Web. Its smaller INT8 LiteRT version performed well on this CPU test, but the GPU could only accelerate part of its encoder, and outline quality still needed validation across more sites.

FastSAM-S illustrates why the benchmark checked the finished geometry. Its FP32 model returned a polygon in 1.05 seconds on WebGPU, but the polygon missed the very point that selected the pile.

---

Source Markdown: https://aasmanbashyal.com.np/projects/amc.md

# Automatic Modulation Classifier

Identifying signal modulation types through automatic classification.

Canonical: https://aasmanbashyal.com.np/projects/amc/

Category: Signal processing

[Project report (PDF)](https://aasmanbashyal.com.np/pdf/automatic_modulation_classification.pdf)

## Abstract

We tested how well classifiers could identify a radio signal’s modulation from its in-phase and quadrature (IQ) samples. The deep learning models classified 11 modulation types in RadioML2016.10A. The likelihood-based classifier and the quantum neural network (QNN) distinguished two types: BPSK and QPSK.

In the [project report](https://aasmanbashyal.com.np/pdf/automatic_modulation_classification.pdf#page=7), Bi-LSTM with attention had the highest overall accuracy of the five deep learning models (56.88%). At a signal-to-noise ratio (SNR) of 14 dB, it reached 84.48% accuracy. Its average prediction time was 0.041 ms per signal. All five models struggled at low SNR.

## Methodology

![AMC System Block Diagram](https://aasmanbashyal.com.np/img/amc/systemblockdiagram.webp)

AMC System Block Diagram

### CNN-LSTM based technique

In a separate CNN–LSTM experiment, the project notes record 60.25% overall accuracy and 90.01% above 12 dB. The four figures below show this model’s architecture and results. Its prediction time is not reported here.

- **Multi-Scale Convolutional Layers**: Utilizes convolutional layers with different kernel sizes to capture features at various scales, crucial for understanding diverse characteristics of radio signals.

- **Regularization Techniques (L1/L2)**: Implements L1 and L2 regularization to prevent overfitting, encouraging model simplicity and parameter smoothness.

- **Batch Normalization**: Normalizes the activations of each layer, aiding in faster training convergence and providing regularization.

- **Max Pooling Layers**: Reduces the spatial dimensions of the input, cutting down on the number of parameters and computational load, which is essential for controlling overfitting.

- **Bidirectional LSTM with Attention Mechanism**: Processes data in both directions with a Bidirectional LSTM, capturing dependencies throughout the sequence. The Attention mechanism enables the model to focus on the most relevant parts of the input sequence for accurate predictions.

- **Dropout Layer**: Introduces a dropout layer to randomly deactivate input units during training, further preventing overfitting.

- **Dense and Output Layers**: Incorporates Dense layers, especially with a high neuron count, to learn complex patterns, and uses a softmax activation in the final layer for effective multi-class classification.

- **Optimization and Metrics**: Employs the Adam optimizer for adaptive learning rate adjustments, with categorical crossentropy as the loss function and accuracy as the performance metric.

![CNN–LSTM network architecture](https://aasmanbashyal.com.np/img/amc/cnnlstm/model.webp)

![CNN–LSTM accuracy versus signal-to-noise ratio](https://aasmanbashyal.com.np/img/amc/cnnlstm/snr_accuracy.webp)

![CNN–LSTM confusion matrix across all SNR levels](https://aasmanbashyal.com.np/img/amc/cnnlstm/overallsnr.webp)

![CNN–LSTM confusion matrices at individual SNR levels](https://aasmanbashyal.com.np/img/amc/cnnlstm/all_snr.webp)

### Other Methods

- **Likelihood-Based Classifiers**: Traditional approach focusing on probabilistic models.

- **Other Deep Learning Techniques**: Different neural network architectures were used. This includes a modified Convolutional Neural Network (ConvNet), and Long Short-Term Memory (LSTM) units enhanced by an attention layer. Additionally, Bidirectional Long Short-Term Memory (Bi-LSTM) for efficient and comprehensive feature extraction.

- **Quantum Neural Network (QNN)**: Basic use of QNN.

![Modified RadioML network architecture](https://aasmanbashyal.com.np/img/amc/namc.webp)

![LSTM architecture with an attention layer](https://aasmanbashyal.com.np/img/amc/namla.webp)

![Bi-LSTM network architecture](https://aasmanbashyal.com.np/img/amc/nambil.webp)

## Results

The report compares five models across SNR levels. Their overall accuracies were 37.33% for LSTM, 46.68% for LSTM with attention, 51.31% for RadioML, 54.84% for the modified CNN, and 56.88% for Bi-LSTM with attention. The separate CNN–LSTM experiment appears under Methodology.

The second chart shows average prediction time per signal on the Google Colab TPU. Of the five models shown, LSTM with attention was the fastest and Bi-LSTM with attention was the slowest.

![Accuracy versus SNR for the five models in the report](https://aasmanbashyal.com.np/img/amc/overallsnr.webp)

![Average prediction time per signal for the five models](https://aasmanbashyal.com.np/img/amc/time.webp)

### Confusion Matrices

![Confusion matrix for LSTM with attention](https://aasmanbashyal.com.np/img/amc/3_sa.webp)

![Confusion matrix for Bi-LSTM with attention](https://aasmanbashyal.com.np/img/amc/4_sa.webp)

![Confusion matrix for the modified CNN](https://aasmanbashyal.com.np/img/amc/2_c.webp)

![QNN confusion matrix for BPSK and QPSK](https://aasmanbashyal.com.np/img/amc/5_c.webp)

![Confusion matrix for the likelihood-based ALRT classifier](https://aasmanbashyal.com.np/img/amc/ca.webp)

### Accuracy

The report’s tables 5.2, 5.4 and 5.5 give accuracy for three 11-class models at the same SNR levels. Values are percentages.

| SNR (dB) | Modified CNN | LSTM with attention | Bi-LSTM with attention |
| --- | --- | --- | --- |
| -10 | 19.36 | 19.24 | 25.44 |
| -8 | 31.18 | 23.55 | 37.46 |
| 0 | 72.44 | 53.41 | 72.06 |
| 4 | 78.36 | 66.84 | 80.93 |
| 16 | 82.59 | 71.37 | 84.22 |
| 18 | 80.95 | 69.99 | 84.12 |

Table 5.6 reports a separate two-class task: distinguishing BPSK from QPSK with the QNN.

| SNR (dB) | QNN accuracy (%) |
| --- | --- |
| -2 | 50.85 |
| 0 | 51.78 |
| 2 | 55.93 |
| 4 | 58.89 |
| 8 | 60.88 |

---

Source Markdown: https://aasmanbashyal.com.np/projects/robotics.md

# Robotics Projects

Robots our team built for ABU Robocon.

Canonical: https://aasmanbashyal.com.np/projects/robotics/

Category: Robotics

The ABU Asia-Pacific Robot Contest [(ABU Robocon)](https://en.wikipedia.org/wiki/ABU_Robocon) is a college-level robot competition for students across the Asia-Oceania region. Founded in 2002 by the Asia-Pacific Broadcasting Union, the contest challenges robots to complete specific tasks within a designated time limit.

## Team Nepal at ABU Robocon 2020

Winner of the Tokyo Electron Award

[Watch video: Team Nepal at ABU Robocon 2020](https://www.youtube.com/watch?v=2GGnZ6cofWo)

## Team Nepal at ABU Robocon 2019

Winner of the ROHM Award

[Watch video: Team Nepal at ABU Robocon 2019](https://www.youtube.com/watch?v=XIxwK-MC9v0)

---

Source Markdown: https://aasmanbashyal.com.np/projects/slam.md

# Simultaneous Localization and Mapping (SLAM)

Robot localization and mapping using a grid map and particle filter.

Canonical: https://aasmanbashyal.com.np/projects/slam/

Category: Robotics

[Project report (PDF)](https://aasmanbashyal.com.np/pdf/slam.pdf)

## Abstract

Simultaneous Localization and Mapping (SLAM) is a method used to numerically solve the problem of extracting a map and determining localization in an unknown environment for mobile robot navigation. It has been widely popular due to its broad range of applications in robotic systems.

Navigating in an unexplored environment is challenging. Various approaches have been developed for this problem, including probabilistic, feature-based, and graph-based methods. We use a grid-map based approach derived from Tiny SLAM, enhanced with a particle filter layer. This approach resulted in an improved map with fewer orientation errors and can handle greater robot motion speeds. However, the robot motion does not incorporate any control measures, resulting in errors in map updates due to inertial jerk.

## Introduction

### Navigation

Navigating in unknown environments presents a unique set of challenges, primarily related to localization and mapping. The localization challenge involves determining the precise position of an entity within an unfamiliar area, while the mapping challenge focuses on creating an accurate representation of the environment. Simultaneous Localization and Mapping (SLAM) offers an iterative solution to these challenges, continuously updating its understanding of both position and environment. However, the process is often complicated by errors in motion and measurements, which can significantly impact accuracy. To address this, a probabilistic approach is employed, allowing for a more robust and flexible response to the uncertainties inherent in navigating unknown spaces. This approach helps in making more informed decisions based on the likelihood of different scenarios, enhancing the overall effectiveness of the navigation system.

### TINY SLAM

TINY SLAM is a simple solution to the SLAM problem, designed for use on embedded platforms. It's quite small, with only about 200 lines of code, and is easy to understand.

### MAP (Occupancy Grid Map)

![Occupancy Grid Map](https://aasmanbashyal.com.np/img/slam/gridmap.webp)

Occupancy Grid Map

MAP is an Occupancy Grid Map used in navigation and mapping where each grid cell is assigned a probability. This probability, denoted as P(mi), represents the chance that the cell is not occupied. Initially, all grid cells are given a value of 0.5, indicating a neutral stance where it's equally likely for the cell to be occupied or unoccupied. This setup allows for a dynamic and probabilistic approach to understanding and mapping an environment.

### Particle Filter

The Particle Filter is a probabilistic method used to provide the best estimation in systems like SLAM . It involves a process called resampling, which helps in refining the accuracy of the estimation. In this approach, each 'particle' represents a possible state, and these particles are evaluated based on their likelihood or the probability of being correct. The most probable particles are then more likely to survive and be carried over to the next generation of estimations. This method significantly improves the performance of existing SLAM systems by continuously updating and refining the understanding of the environment based on the probability of different scenarios.

![Particle filter in action](https://aasmanbashyal.com.np/img/slam/bwpf.webp)

Particle filter in action

## Methodology

### System Block Diagram

![System Block Diagram](https://aasmanbashyal.com.np/img/slam/systemdiagram.webp)

### Flow diagram

![Flow diagram](https://aasmanbashyal.com.np/img/slam/messageflow.webp)

---

Source Markdown: https://aasmanbashyal.com.np/projects/gaussian.md

# Gaussian Splatting

Rendering novel views with Gaussian Splatting, with the mathematics behind the technique.

Canonical: https://aasmanbashyal.com.np/projects/gaussian/

Category: 3D graphics

## Overview

3D Gaussian Splatting represents a scene with learned Gaussians for novel-view rendering. The [2023 method by Kerbl and colleagues](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/) starts with calibrated images and sparse points, then optimizes the scene representation with a fast splat renderer.

[Watch video: Gaussian splatting rendering](https://www.youtube.com/watch?v=-6xx_EPm7YA)

## Steps of Gaussian Splatting

### 1. Data Collection

Collect overlapping images of the scene. Estimate camera parameters and a sparse point cloud, typically using Structure from Motion.

### 2. Preprocess the Point Cloud

- Check the camera poses and remove unreliable points.

- Use the remaining points to initialize Gaussian centers.

### 3. Define the Gaussian Function

Each Gaussian has a center and covariance, along with learned opacity and view-dependent color. Its spatial shape is:

G(x) = exp(-½ \* (x - μ)^T \* Σ⁻¹ \* (x - μ))

- **μ** is the mean or center of the Gaussian (the location of the data point).

- **Σ** is the covariance matrix that determines the shape of the Gaussian (how spread out or narrow it is).

- **x** is the 3D point in space.

The covariance matrix controls the **width** and **orientation** of the Gaussian splat. If the covariance is small, the splat will be narrow and sharp; if it is large, the splat will be broader and softer.

### 4. Splatting Process

Project each visible 3D Gaussian onto the image plane as a 2D footprint.

### 5. Blending Overlapping Gaussians

Sort contributions by depth and use alpha compositing. With contributions ordered front to back:

C = Σ\_i c\_i α\_i ∏\_{j<i} (1 − α\_j)

Here, c\_i is color and α\_i combines the Gaussian footprint with learned opacity. Earlier contributions reduce the visibility of later ones.

### 6. Rendering the Scene

The visibility-aware rasterizer evaluates these contributions to produce the image. The original method uses splat rasterization rather than tracing a ray through every Gaussian.

### 7. Optimization

Optimize Gaussian parameters against the training images, with density control to add or remove Gaussians as needed.

---

Source Markdown: https://aasmanbashyal.com.np/projects/sfm.md

# Structure from Motion (SfM)

An SfM pipeline covering feature detection, camera pose estimation, triangulation, and 3D reconstruction.

Canonical: https://aasmanbashyal.com.np/projects/sfm/

Category: 3D graphics

Structure from Motion (SfM) is a computer vision technique for reconstructing 3D structures from 2D image (sequential and non-sequential). This project demonstrates the end-to-end pipeline for SfM, including feature detection, camera pose estimation, triangulation, and 3D point cloud generation with code, mathematical representation and open source alternatives.

[Watch video: Structure from Motion reconstruction](https://www.youtube.com/watch?v=x0KW0VWS5S4)

## Reconstruction pipeline

The following steps are typically used in standard structure from motion.

### 1. Camera Model

It is a mathematical representation that describes how a 3D point in the world is projected onto a 2D image plane. Simple **pinhole camera model** is represented by the following mathematical formula:

s x = K \[R | t\] X

- **x**: 2D point in the image (in homogeneous coordinates).

- **K**: Intrinsic camera matrix (focal length, principal point).

- **R, t**: Camera rotation and translation (extrinsic parameters).

- **X**: 3D point in the scene.

- **s**: Projective scale.

### 2. Feature Detection

Detect stable keypoints **x\_i** and compute descriptors to match them across images. Common choices include Scale-Invariant Feature Transform (SIFT) and Oriented FAST and Rotated BRIEF (ORB).

### 3. Feature Matching

Once features are detected across several images taken from different viewpoints, the next step is to match them across images. This is where the descriptors come in, as they uniquely identify the features.

- Match descriptors **x\_i ↔ x\_j** between image pairs.

- Compare descriptors using a suitable distance metric. A k-d tree can accelerate nearest-neighbor searches for floating-point descriptors; binary descriptors such as ORB use Hamming distance.

- Filter out outliers using techniques like RANSAC.

### 4. Fundamental Matrix Estimation

The **Fundamental Matrix** F satisfies the epipolar constraint:

x\_j^T \* F \* x\_i = 0

To estimate F:

1. Use the **eight-point algorithm**: Construct a linear system from matched points and solve A\*f = 0.

2. Enforce the rank-2 constraint on F by applying Singular Value Decomposition (SVD).

### 5. Essential Matrix Estimation

The **Essential Matrix** E is derived from F and camera intrinsics K:

E = K^T \* F \* K

Decompose E into relative rotation R and translation t using SVD.

### 6. Triangulation

For each matched feature pair, compute the 3D point X by solving a system and applying SVD.

### 7. Bundle Adjustment

Refine camera parameters and 3D points by minimizing the **reprojection error** using non-linear least squares methods like the **Levenberg-Marquardt algorithm**.

### 8. Sparse Point Cloud

Combine triangulated points X into a **sparse point cloud** representing the scene.

### 9. Dense Reconstruction (Optional)

To densify the sparse point cloud, use **Multi-View Stereo (MVS)** to estimate depth for every pixel.

---

Source Markdown: https://aasmanbashyal.com.np/projects/terrain.md

# 3D Terrain Editing

Editing 3D terrain and flattening selected surfaces into 2D while preserving texture.

Canonical: https://aasmanbashyal.com.np/projects/terrain/

Category: 3D graphics

I designed and implemented a prototype for editing 3D terrain models. It flattens selected polygonal surfaces into 2D while preserving their texture. Operations take 1 to 3 seconds.

## Demonstration

[Watch video: Interactive 3D terrain editing](https://www.youtube.com/watch?v=EnAdTsuaO2A)

Flattening 3D surface

---

Source Markdown: https://aasmanbashyal.com.np/projects/snapping.md

# CAD Snapping

Snapping for precise measurements in a CAD overlay.

Canonical: https://aasmanbashyal.com.np/projects/snapping/

Category: CAD

I developed snapping for a Computer-Aided Design (CAD) overlay to help position measurements precisely.

## Feature Demonstration

[Watch video: CAD snapping demonstration](https://www.youtube.com/watch?v=DwzLX37WaFg)

Enabling Snapping

---

Source Markdown: https://aasmanbashyal.com.np/blogs/jpeg-compression-and-apriltags.md

# How much JPEG compression can an AprilTag tolerate?

A paired benchmark measures how JPEG quality, tag size, and viewing angle affect AprilTag detection.

Canonical: https://blogs.aasmanbashyal.com.np/blogs/jpeg-compression-and-apriltags/

Topics: computer-vision, robotics, image-compression

Published: October 18, 2026

At JPEG quality 20, the detector decoded 2,984 of 3,000 AprilTags on held-out scenes with nominal tag widths of at least 32 px and yaw up to 65°. All 16 misses came from one view, a nominal 32 px tag at 65° yaw. PNG decoded all 120 tags at that view. Q20 decoded 104. [Held-out counts by size and angle](https://aasmanbashyal.com.np/downloads/apriltag-jpeg/heldout-size-angle.csv)

## The same frame, encoded both ways

An AprilTag encodes its ID in a grid of black and white cells. The detector looks for a quadrilateral, then samples the pattern inside it \[1\]. I measure nominal tag width across the black border with the tag facing the camera. At an angle, the tag's cells cover fewer pixels. JPEG quantization can change the contrast between cells that already occupy only a few pixels.

![One rendered frame branches into lossless PNG and a JPEG quality sweep. The same detector runs on both branches, then its decoded ID and location are checked.](https://aasmanbashyal.com.np/img/blog/apriltag-jpeg/benchmark-pipeline.png)

Each comparison starts with the same pixels. A detection counts when the ID and location match the rendered tag.

I rendered one `tag36h11` marker per 640 × 480 frame, using procedural backgrounds and photographs from BSDS500 and COCO128 \[2, 3\]. Each held-out photo or procedural seed contributed ten tag sizes and six yaw angles. All views and encodings of a given photo or seed stayed together, leaving 120 background groups for evaluation and 240 for development. I used the same full-resolution detector on each encoding \[4\]. [Benchmark methods](https://aasmanbashyal.com.np/downloads/apriltag-jpeg/methods.txt) · [Archived run audit](https://aasmanbashyal.com.np/downloads/apriltag-jpeg/audit.json) · [Benchmark code and data on GitHub](https://github.com/aasmanbashyal/apriltag-jpeg)

![Four crops of the same tag from PNG and JPEG Q70, Q20, and Q5. The detector reads ID 415 in the first three encodings and misses the tag at Q5.](https://aasmanbashyal.com.np/img/blog/apriltag-jpeg/tag-compression.png)

A 24 px tag at 50° yaw from the pilot run. The crops come from the original encoded files and are enlarged without smoothing.

## Small tags lost more detections

At Q20, recall fell from 54.3% to 43.8% for the 12, 16, 20, and 24 px tags. Among the 64, 96, and 128 px tags, the detector read 2,159 of the 2,160 it read in PNG. The loss in recall was 10.47 percentage points greater for small tags than for large tags, with a 95% bootstrap interval of 9.51 to 11.48 points. The bootstrap resampled whole background groups to keep related views together. [Primary comparison](https://aasmanbashyal.com.np/downloads/apriltag-jpeg/primary-contrast.csv)

| Encoding | Mean file size | Correct-ID recall |
| --- | --- | --- |
| PNG | 496.7 KB | 70.4% |
| JPEG Q70 | 38.2 KB | 69.3% |
| JPEG Q20 | 16.3 KB | 64.8% |

Across all 7,200 held-out scenes, Q70 cut the mean file size by 92.3%. The 1.1-point drop in recall combines two paired outcomes. JPEG lost 112 tags that PNG could read and recovered 32 that PNG missed. File sizes include image headers and use decimal kilobytes. Q values are settings for Pillow's JPEG encoder \[5\]. [Pooled held-out results](https://aasmanbashyal.com.np/downloads/apriltag-jpeg/heldout-pooled.csv)

## What happened at 65° yaw

On development scenes in the selected size and angle range, Q20 was the lowest setting to meet the pooled targets. It and every higher tested quality had to reach 99% recall, lose at most 1% of tags detected in PNG, and keep the 95th-percentile corner error within 0.5 px. [Development quality sweep](https://aasmanbashyal.com.np/downloads/apriltag-jpeg/development-selection.csv)

At the same nominal 32 px width, Q20 decoded all 120 held-out tags at 55° yaw. At 75°, outside the range used to select Q20, even PNG decoded just three.

![Heatmaps compare PNG and JPEG Q20 at ten tag sizes and six yaw angles. The outlined 32 px, 65° cell drops from 100% with PNG to 87% with Q20.](https://aasmanbashyal.com.np/img/blog/apriltag-jpeg/heldout-recall.png)

Each cell contains 120 held-out scenes. Labels round recall to whole percentages. The outlined cell marks the 32 px view at 65° yaw.

At that view, Q40 and Q50 each decoded 118 of 120 tags. Q60 was the first JPEG setting in the sweep to decode all 120, at an average of 31.9 KB per frame. That's about twice the size of Q20 and 6.4% of the PNG size for this view. I compared those settings on the same held-out scenes that exposed the misses. I'd try Q60 on a physical camera and check whether it holds up on fresh frames of that approach. [Quality sweep at 32 px and 65°](https://aasmanbashyal.com.np/downloads/apriltag-jpeg/heldout-32px-65deg.csv)

![Recall versus mean file size on a log scale. The 32 px, 65° view reaches 87% at Q20 and 100% at Q60. The line for all 7,200 held-out scenes varies less across the sweep.](https://aasmanbashyal.com.np/img/blog/apriltag-jpeg/file-size-and-recall.png)

Filled markers show JPEG settings. Hollow markers show the PNG references. The horizontal axis uses a log scale. [Open full-size chart](https://aasmanbashyal.com.np/img/blog/apriltag-jpeg/file-size-and-recall.png)

## Start with the hardest view your camera needs to read

Every marker in this benchmark was rendered, including those on photographic backgrounds. On a physical camera, start with lossless frames at the distances and angles the tag will actually be seen. If the detector already misses the tag in those frames, check marker size and blur before tuning compression.

Encode those same frames at several JPEG settings and count which detections disappear in the views that matter to the robot. If you use the tag for pose estimation, measure how far the detected corners move on tags both encodings can read.

## References

\[1\] E. Olson, "AprilTag: A Robust and Flexible Visual Fiducial System," *IEEE International Conference on Robotics and Automation*, 2011, pp. 3400–3407. [Published paper](https://doi.org/10.1109/ICRA.2011.5979561) · [Author's copy, Sections III-B and IV](https://april.eecs.umich.edu/media/media/pdfs/olson2011a.pdf)

\[2\] P. Arbeláez, M. Maire, C. Fowlkes, and J. Malik, "Contour Detection and Hierarchical Image Segmentation," *IEEE Transactions on Pattern Analysis and Machine Intelligence*, vol. 33, no. 5, pp. 898–916, May 2011. [Published paper](https://doi.org/10.1109/TPAMI.2010.161) · [Berkeley BSDS500 dataset](https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/resources.html)

\[3\] Ultralytics, "COCO128 Dataset," *Ultralytics documentation*. [Dataset documentation](https://docs.ultralytics.com/datasets/detect/coco128)

\[4\] Pupil Labs, `pupil-apriltags` 1.0.4.post11, *Python Package Index*. [Version used](https://pypi.org/project/pupil-apriltags/1.0.4.post11/) · [AprilTag 3 detector source](https://github.com/AprilRobotics/apriltag)

\[5\] Pillow contributors, "Image File Formats," *Pillow documentation*. [JPEG encoder options](https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#jpeg)

---

Source Markdown: https://aasmanbashyal.com.np/blogs/tinyml.md

# When weight pruning helps TinyML

A pruned model can fit in less flash and take longer to run. A Cortex-M55 benchmark shows why, and what to measure on your own board.

Canonical: https://blogs.aasmanbashyal.com.np/blogs/tinyml/

Topics: TinyML, model-compression, deep-learning

Published: February 24, 2026

In a Cortex-M55 benchmark, the smallest pruned ResNet-12 model took 646 ms per inference. The fastest took 234 ms \[1, Fig. 11(a)\]. Both numbers matter in TinyML, where a model has to fit in a microcontroller's memory and finish each prediction within the application's time and power budgets \[2\].

## What happens after you prune a weight?

Magnitude pruning sets the weights closest to zero to exactly zero. You can then fine-tune the remaining weights to recover accuracy \[3\]. Frankle and Carbin's lottery ticket experiments showed that some sparse subnetworks could match the original network's test accuracy when trained from their original initial weights \[4\].

With **unstructured pruning**, you zero individual weights and keep the tensor's shape. A dense kernel can still visit every weight slot, including the zeros. A sparse encoding can omit the zeros and store the remaining values with information about their positions. To save compute, the inference kernel has to use that encoding to skip work. Reading the positions and gathering the corresponding inputs takes time too \[1, Sec. III\].

![Dense storage keeps zero slots and the kernel visits every slot. Sparse storage keeps nonzero values and their indexes so the kernel can skip zero slots.](https://aasmanbashyal.com.np/img/blog/tinyml-pruning.svg)

Two ways to deploy the same pruned weights. The sparse path trades weight slots for index lookups.

With **structured pruning**, you can remove whole convolution filters and adjust the layers that consume their outputs. The exported model has fewer channels to compute, so it can still use a dense kernel. Removing an entire filter is a coarser choice than removing one weight, which can cost accuracy when you prune aggressively \[1, Sec. III\].

## A smaller model that ran slower

In their 2024 DTMM paper, Han and colleagues compared three pruned, 8-bit ResNet-12 variants for CIFAR-10 image classification. They used a Cortex-M55 at 120 MHz and kept accuracy loss below 0.5% \[1, Sec. V\]. The table reproduces the ResNet-12 values from Figure 11(a) \[1, Fig. 11(a)\].

| Method | Model size (KB) | Latency (ms) | Runtime memory (KB) |
| --- | --- | --- | --- |
| CHIP | 406 | 234 | 93 |
| PatDNN | 247 | 646 | 87 |
| DTMM | 270 | 255 | 93 |

The unpruned 8-bit model occupied 1,248 KB and used 96 KB at runtime \[1, Table II\].

For PatDNN, the authors implemented a sparse convolution kernel on the microcontroller. They attributed its higher latency to the cost of handling scattered weights and their indexes. DTMM pruned groups of weights at the same filter position across input channels, then used a storage format and kernel designed for those groups. In this test, that combination brought latency close to CHIP while keeping the model about a third smaller \[1\].

## What to measure on your board

Start with the dense model at the precision you plan to ship, such as 8-bit. Run it and the pruned candidate on the same board, with the same inputs and clock settings. Measure the budget you are trying to meet.

- **Flash.** Compare the linked firmware sizes. A sparse format saves bytes on weights but adds metadata and may require extra kernel code.

- **Peak SRAM.** Track intermediate tensors and scratch buffers as well as the stack and application buffers. A smaller model can still need the same activation memory \[5\].

- **Latency and energy.** Time repeated predictions, including preprocessing and any decoding that happens per prediction. If setup decodes the weights once, measure startup separately. Measure energy per prediction under the same conditions if battery life matters \[6\].

- **Accuracy.** Run both variants on the same held-out data and check that the pruned version still meets the application's threshold.

If the firmware is too large for flash, a speed penalty may be acceptable. If a prediction has to finish before the next sensor window, the kernel's measured latency matters more than the sparsity percentage.

## References

\[1\] L. Han, Z. Xiao, and Z. Li, "DTMM: Deploying TinyML Models on Extremely Weak IoT Devices with Pruning," in *Proc. IEEE Conf. Comput. Commun. (INFOCOM)*, Vancouver, BC, Canada, 2024, pp. 1999–2008. [doi: 10.1109/INFOCOM52122.2024.10621387](https://doi.org/10.1109/INFOCOM52122.2024.10621387) · [Open full text, Figure 11](https://www.cs.cityu.edu.hk/~zhenjili/2024-Infocom-DTMM.pdf#page=8)

\[2\] P. Warden and D. Situnayake, *TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers*. Sebastopol, CA, USA: O'Reilly Media, 2019. [Publisher](https://www.oreilly.com/library/view/tinyml/9781492052036/)

\[3\] S. Han, H. Mao, and W. J. Dally, "Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding," in *Proc. Int. Conf. Learn. Represent. (ICLR)*, San Juan, Puerto Rico, 2016. [Full text](https://arxiv.org/abs/1510.00149)

\[4\] J. Frankle and M. Carbin, "The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks," in *Proc. Int. Conf. Learn. Represent. (ICLR)*, New Orleans, LA, USA, 2019. [Full text](https://arxiv.org/abs/1803.03635)

\[5\] TensorFlow Lite Micro contributors, "Memory Management in TensorFlow Lite Micro," *TensorFlow Lite Micro documentation*. Accessed Nov. 17, 2026. [Online documentation](https://github.com/tensorflow/tflite-micro/blob/main/docs/memory_management.md)

\[6\] M. Deutel, P. Woller, C. Mutschler, and J. Teich, "Energy-efficient Deployment of Deep Learning Applications on Cortex-M based Microcontrollers using Deep Compression," in *Proc. 26th Workshop MBMV*, Freiburg, Germany, 2023, pp. 13–24. [Proceedings record](https://ieeexplore.ieee.org/document/10173060) · [Open full text](https://arxiv.org/abs/2205.10369)

---

Source Markdown: https://aasmanbashyal.com.np/blogs/spectral.md

# When low-pass filtering helps graph neural networks

Why low-pass filtering helps graph neural networks, and when removing high-frequency signals can lose useful information.

Canonical: https://blogs.aasmanbashyal.com.np/blogs/spectral/

Topics: GNN, deep-learning

Published: May 10, 2025

Many graph convolution models smooth neighboring node features. Simple Graph Convolution, for example, applies a fixed low-pass filter followed by a linear classifier \[2\]. This is useful when nearby nodes have similar labels. Spectral graph filters can also preserve or emphasize other frequencies, so low-pass filtering is a model choice, not a requirement of every spectral GNN \[1\].

## Low-pass filtering and homophily

In a citation network, linked papers may share research areas \[3\]. This tendency for connected nodes to share labels is called homophily \[4\]. Smoothing can make their feature representations more similar and help a classifier use the graph structure.

SGC precomputes repeated feature propagation before fitting its classifier \[2\]. It uses node features and graph connectivity for propagation, with the labeled nodes supplying the training targets. It does not need a label for every node.

![Graph convolutional network architecture from Kipf and Welling \[3\]](https://aasmanbashyal.com.np/img/blog/semi_hidden_layer_gnn.webp)

Graph convolutional network architecture from Kipf and Welling \[3\]

## Capturing graph-level patterns

Graph-level tasks, including molecular property prediction \[5\], combine node representations into a prediction for the whole graph. Smoothing can help aggregate information, but low-frequency components do not automatically capture every useful global property. The filter, propagation depth, and graph readout affect what information survives \[6, 7\].

## When high frequencies matter

High-frequency components describe differences across neighboring nodes. Those differences may be useful, so treating them all as noise can remove information needed for a task. Repeated smoothing can also make distinct nodes harder to distinguish \[7\].

Heterophily alone does not establish that a model will fail. Platonov and colleagues found that standard GNNs performed strongly on several heterophilous benchmarks, and that flaws in earlier datasets affected comparisons \[4\]. Evaluate filtering choices on the actual graph and task.

## References

\[1\] Z. Wu et al., [A Comprehensive Survey on Graph Neural Networks](https://doi.org/10.1109/TNNLS.2020.2978386), 2021.

\[2\] F. Wu et al., [Simplifying Graph Convolutional Networks](https://arxiv.org/abs/1902.07153), 2019.

\[3\] T. N. Kipf and M. Welling, [Semi-Supervised Classification with Graph Convolutional Networks](https://arxiv.org/abs/1609.02907), 2017.

\[4\] O. Platonov et al., [A critical look at the evaluation of GNNs under heterophily: Are we really making progress?](https://arxiv.org/abs/2302.11640), 2024.

\[5\] O. Wieder et al., [A compact review of molecular property prediction with graph neural networks](https://doi.org/10.1016/j.ddtec.2020.11.009), 2020.

\[6\] R. Li et al., [Adaptive Graph Convolutional Neural Networks](https://arxiv.org/abs/1801.03226), 2018.

\[7\] H. NT and T. Maehara, [Revisiting Graph Neural Networks: All We Have is Low-Pass Filters](https://arxiv.org/abs/1905.09550), 2019.

---

Source Markdown: https://aasmanbashyal.com.np/gallery.md

# Aasman Bashyal's gallery

Canonical: https://aasmanbashyal.com.np/gallery/

20 photographs and images. Each link opens the original image.

## Competitions

### Robocon 2020 team with the competition robot

[Original image](https://aasmanbashyal.com.np/img/memories/robocon2020.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/robocon2020_thumb.webp)

### Three participants on the arena floor in Mongolia

[Original image](https://aasmanbashyal.com.np/img/memories/mongolia_group_1.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mongolia_group_1_thumb.webp)

### Group portrait inside the competition arena

[Original image](https://aasmanbashyal.com.np/img/memories/mongolia_group_2.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mongolia_group_2_thumb.webp)

### Teams seated beside the competition field

[Original image](https://aasmanbashyal.com.np/img/memories/mongolia_group_3.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mongolia_group_3_thumb.webp)

### Working on the robot in the Nepal team pit

[Original image](https://aasmanbashyal.com.np/img/memories/mongolia_group_4.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mongolia_group_4_thumb.webp)

### On the grasslands in Mongolia

[Original image](https://aasmanbashyal.com.np/img/memories/mongolia_solo.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mongolia_solo_thumb.webp)

### Team photo on the Robocon 2019 stage

[Original image](https://aasmanbashyal.com.np/img/memories/abu_2019_group.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/abu_2019_group_thumb.webp)

### Nepal’s flag at Robocon 2019

[Original image](https://aasmanbashyal.com.np/img/memories/abu_2019.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/abu_2019_thumb.webp)

### Team Nepal with its ABU Robocon 2018 sign

[Original image](https://aasmanbashyal.com.np/img/memories/abu_2018.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/abu_2018_thumb.webp)

### Group photo at the robotics workshop in 2018

[Original image](https://aasmanbashyal.com.np/img/memories/abu_2018_2.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/abu_2018_2_thumb.webp)

### Beside the ABU Robocon 2018 sign

[Original image](https://aasmanbashyal.com.np/img/memories/abu_2018_solo.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/abu_2018_solo_thumb.webp)

## Workshop

### Robot chassis on a test platform

[Original image](https://aasmanbashyal.com.np/img/memories/robot_1.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/robot_1_thumb.webp)

### Robot carrying blue cylinders on the practice field

[Original image](https://aasmanbashyal.com.np/img/memories/robot_2.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/robot_2_thumb.webp)

### Terminal blocks and connectors on a circuit board

[Original image](https://aasmanbashyal.com.np/img/memories/circuit_1.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/circuit_1_thumb.webp)

### Component side of the controller board

[Original image](https://aasmanbashyal.com.np/img/memories/circuit_2.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/circuit_2_thumb.webp)

### Copper traces on the underside of a circuit board

[Original image](https://aasmanbashyal.com.np/img/memories/circuit_3.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/circuit_3_thumb.webp)

### Circuit board marked ABU Robocon 2019

[Original image](https://aasmanbashyal.com.np/img/memories/circuit_4.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/circuit_4_thumb.webp)

## Mentorship

### Mentor training completion certificate

[Original image](https://aasmanbashyal.com.np/img/memories/mentorship_1.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mentorship_1_thumb.webp)

### Workshop participants holding small robots

[Original image](https://aasmanbashyal.com.np/img/memories/mentorship_2.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mentorship_2_thumb.webp)

### Group photo in the training room

[Original image](https://aasmanbashyal.com.np/img/memories/mentorship_3.webp) · [Thumbnail](https://aasmanbashyal.com.np/img/memories/mentorship_3_thumb.webp)

---

Source Markdown: https://aasmanbashyal.com.np/terminal.md

## What I'm doing now (Oct 2026)

### Work & Research

I work remotely as a Research & AI Architect at Angelswing. My primary focus right now is computer vision and geospatial data.

### Current focus

I am studying AI at the edge.

---

Inspired by the [/now](https://sive.rs/now) page movement.
