Selected work  ·  2024 – 2026

Shivpratap Singh Panwar

Humanoid perception & RL engineer — robot vision, locomotion policies, sim → sim → hardware, industrial CV

Everything here has to survive a physical robot — actuators that answer late, a head camera feeding a policy, a CPU with no GPU beside it. That constraint is what the work is about. The recurring theme is not a model architecture, it is refusing to trust a number that has not earned it: the policy that never falls until actuation delay is modelled, the gait reward that quietly rewards marching in place, the validation split that shares images with training.

01

Humanoid RL & sim-to-real

Sim → sim → hardware (day job, Kody Technolab)

details withheld URDF → MJCF · verified against CAD PPO · MuJoCo Warp / mjlab latency-aware training ONNX → C++ runner
idealised sim
0%
falls
+ 45 ms actuation delay
100%
falls, same policy
retrained with the delay
0%
falls

The whole path from a robot description to a policy on the robot. The URDF is converted to MJCF and an automated verifier checks the model against the CAD before anything trains on it, because a policy trained on a wrong model learns the wrong robot. Velocity-tracking and motion-tracking tasks are trained with PPO in MuJoCo Warp / mjlab, with mass randomisation, datasheet torque limits and an actuation-latency model. The policy is exported to ONNX and run by a C++ state-machine runner behind a hardware-abstraction layer, so the same runner can face a second simulator or the hardware.

The sim → sim step earns its place. A policy with 0% falls in an idealised sim fell 100% of the time once a 45 ms actuation delay was modelled; retrained with the delay, it was back to 0%. Robot, CAD, customers and internal code stay with my employer.

G1 Robust Locomotion

public Unitree G1 · 23-DoF PPO / RSL-RL MuJoCo Warp · mjlab trained from scratch
The mechanism. As commanded speed rises, gait_params_at_speed blends the cycle 0.6 s → 0.4 s and stance 0.56 → 0.40 between 1.0 and 2.0 m/s. The feet run half a cycle apart, so once stance drops below 0.5 the two stance windows stop overlapping: double support disappears and a flight phase opens. Under the fixed clock that gap can never exist, so a running gait is unrewardable however the reward is tuned. Values from the task configuration; this animates the clock (slowed 4×), not a recording of a trained policy.

Stand, walk forward and backward, run, and take hits from any direction — trained from scratch, no pretrained policy and no imitation data. Robustness comes from two different disturbances, not one: instantaneous push impulses, and a sustained random-heading drag that holds force for seconds and keeps stealing momentum. A shove and a drag fail a policy in different ways, so each gets its own curriculum, layered over a three-stage command-envelope curriculum so difficulty rises on two axes at once.

Anti-reward-hacking is a design axis. Every gait reward ships alongside the term that closes its exploit — marching in place, foot sliding, hard landings, posture drift. When the policy failed backward pushes, it got a dedicated isolation run and a targeted curriculum fix before any retraining: debugging a policy like a system rather than a slot machine. Trained end-to-end on 2×T4 with a checkpoint/resume harness that survives 9–12 h session kills.

source · github.com/shivpratapsinghpanwar/g1-robust-locomotion

02

Humanoid perception & edge VLA

Humanoid Perception for Edge

public Tiangong 2 Pro · MuJoCo RGB-D head camera · metric depth SmolVLA · 50 Hz loop CPU latency harness
p50 / chunk
9.6 s
50 actions · SmolVLA-base fp32
p95 / chunk
11.5 s
i5-10210U, CPU only
peak RSS
6.6 GB
resident memory

The perception-to-action path of a humanoid, end to end in simulation: a Tiangong 2 Pro in MuJoCo with an RGB-D head camera producing metric depth, feeding SmolVLA inside a 50 Hz control loop. Actions go through a 17-joint upper-body action contract resolved by joint name, not by array position, so a reordered model or robot description cannot silently drive the wrong joint, and then through a safety filter — a ±0.30 rad envelope plus a rate limit — before anything reaches an actuator.

Status, stated plainly: this is a plumbing milestone. The loop, the contract, the filter and the latency harness work; the motion is not trained yet. The harness exists to measure what the model costs on the kind of CPU an edge robot actually has — and on this one, the base model is nowhere near real time. That number is the reason for TernaVLA.

source · github.com/shivpratapsinghpanwar/Humanoid_Perception_for_Edge

TernaVLA

public 1.58-bit ternary VLA backbones laptop CPU bitnet.cpp vs ONNX Runtime
0.5B tier
0.44 s
per chunk · 8 threads · real time
1B tier
1.48 s
per action chunk
2B tier
2.42 s
per action chunk
bitnet.cpp, real 2B
2.10 s
per 91-token step · 21% faster than ORT

How large can a VLA backbone be and still keep up on a CPU? Ternary (1.58-bit) backbones are benchmarked on a laptop CPU at three sizes. The tier numbers use random weights at real layer shapes — they measure compute, not competence — and at 8 threads the 0.5B tier runs an action chunk in 0.44 s, fast enough for real time. The real 2B model runs under bitnet.cpp at 2.10 s per 91-token step, 21% faster than ONNX Runtime.

source · github.com/shivpratapsinghpanwar/TernaVLA

TernaVLM

public BitNet b1.58 2B SigLIP2 1.58-bit ternary
Quantise inside the adapted weight, not around it PLAIN LoRA ON A TERNARY LM y = x · Q(W)ᵀ + s · x · (BA)ᵀ this delta is full precision deployed model is no longer ternary · merge → requantise = train/test mismatch TERNARY QAT-LoRA (THIS WORK) y = Q_int8(x) · Q_ternary(W + s·BA)ᵀ straight-through estimator carries the gradient merge is exact — unit-tested bit-for-bit TOKEN PATH SigLIP2-base frozen · 256 px pixel-shuffle 2×2 256 patches → 64 tokens MLP projector trained BitNet b1.58 2B — weights ∈ {−1, 0, +1} ternary QAT-LoRA · integer-only CPU kernels
Status: active research. Layer code is unit-tested on CPU and staged training is underway; no benchmark results are claimed yet. Ternary LMs already run fast on CPUs with integer-only kernels, but no ternary VLM has been released — this attaches a vision encoder without ever leaving the ternary regime.

The vision side of the ternary stack. Checkpoints carry only the projector, the LoRA and optimiser state, so a session resumes from the exact data cursor — epoch, shard, row — and the trainer stops itself before the platform's session limit so a run never dies mid-write.

source · github.com/shivpratapsinghpanwar/ternary-vlm

Production robot perception

details withheld multi-camera · multi-task detection · instance segmentation · pose · depth FP16→INT4 · edge targets

Multi-camera, multi-task perception — detection, instance segmentation, pose and depth — built and quantised from FP16 down to INT4 for real-time inference on constrained edge targets. Architecture, customers and deployment specifics stay with my employer.

03

Industrial CV & data tooling

data-doctor

on PyPI Python · Pillow only CI-gated MIT
Hashes nominate; only pixels convict STAGE 1 Exact SHA-256 over bytes catches identical copies STAGE 2 — NOMINATE dHash + DCT pHash all 8 dihedral orientations 16-bit quadrant bucketing STAGE 3 — VERIFY Decoded pixels greyscale thumbnails, 8 orients reports score + orientation hash coincidences rejected here — a nomination is not a finding Found in a delivered production split: 81 byte-identical groups spanning train and val · 40.3% of the validation set leaked · reported recall 0.75 did not survive an honest split
Why it exists. Nothing in the training stack warned. The reference model scored 0.75 recall on the delivered split and substantially less on a clean one — the split itself was the bug. Three stages mean every reported duplicate is a concrete, pixel-verified claim carrying its measured similarity and matching orientation (99.4% similar, rot90), not a fuzzy-hash guess.
Try it — a leakage check on conveyor frames, running in this page sample frames are generated here; or drop in your own images, which never leave the browser
train
val
running…
The same three stages as the package, ported to the browser: SHA-256 over the file bytes, then dHash over all 8 orientations of a 64×64 greyscale thumbnail to nominate, then 1 − mean absolute pixel difference across the 8 orientations to verify, plus the package's DCT pHash. One sample, a mirrored and heavily recompressed JPEG, sits just past the default hash distance: widen it and the pixel check confirms the copy. The package buckets hashes for speed; this demo compares every pair, so keep your own sets to a few hundred images.

Inspection data often comes from video of one line, where adjacent frames are near-copies that leak between splits unless something checks. A 10-second habit instead of a post-mortem: exact duplicates, near-duplicates, train/val leakage and COCO structural defects (duplicate ids, annotations referencing missing images, degenerate boxes and polygons, zero-annotation images) in one command. Exit code 1 on failure, so it drops straight into CI. Rotated, flipped, re-encoded and resized copies are caught, and the hash distance sets how much recompression it tolerates.

install · pip install vision-data-doctor
source  · github.com/shivpratapsinghpanwar/data-doctor

EasyAnnotate

public on PyPI annotate · convert · clean · split · augment VOC · YOLO · COCO · LabelMe · CSV CLI · web · desktop · Docker

The whole dataset workflow for an inspection line in one tool: annotate, import a model's predictions and correct them, convert between formats, deduplicate, split without leakage, resize, tile, augment, and report. One rule decides what ships: if a feature needs configuring before you can draw the first box, it does not ship. Mainstream annotation tools ask for an organisation, a project, a label schema and a task first. Here a class is created by drawing a box and typing its name.

setup before first box
0 steps
no project, schema or task
formats
5
read and written, boxes and polygons
ways to drive it
4
menu, CLI, YAML recipes, browser
automated tests
550
core, service and editor
Try it — draw a box a working cut-down of the editor: boxes only, three generated images, nothing leaves the page

    

What the demo shows. There is no Save button: edits are kept 400 ms after you stop. All three formats come from one neutral record, so adding a format means one reader and one writer, not a converter for every pair. The index toggle shows the quiet failure: a YOLO file stores a class number, so a tool that sorts names at export moves every index after a newly added class, and old label files change meaning without an error. EasyAnnotate allocates an index once and never moves it.

The model loop. Annotate a few hundred images, train, then load the model's predictions back in — YOLO, VOC, LabelMe, COCO, or the bare detection-results list that evaluation scripts emit. Predictions render dashed and fade with confidence; one key accepts what is visible and moves on. Every import reports what did not match, because a file-name mismatch that imports zero shapes looks exactly like a model that predicted nothing. Export takes reviewed images only by default: feeding a model its own unchecked predictions as ground truth is how it poisons itself, and nothing in the output looks wrong when it happens.

Model agreement tells you when to retrain and when to stop. It counts only images a person has reviewed, and it counts deletions, since deleting a false positive is the commonest correction there is. Segmentation models such as SAM propose outlines from a separate process, so an out-of-memory crash takes the tool down, not the editor, and masks are simplified to editable polygons with a vertex cap rather than thousand-point outlines. Existing folders can be annotated in place, writing back to their own VOC, LabelMe or YOLO files atomically.

editor at 20k images
1.6 s
to first image
page loads
5–7 ms
at 20k images
SAM, RTX 2050
0.044 s
per click
SAM, CPU
0.17 s
per click

install · pip install easyannotate
source  · github.com/shivpratapsinghpanwar/EasyAnnotate

Hobby project: conveyor-belt rock segmentation and sizing (Mask R-CNN, GigE camera, operator dashboard).

04

Research

Synthetic Data Factory

public SD 1.5 + LoRA HAM10000 3 seeds · paired arms 1,508-image held-out test
macro-F1 Δ
+0.005
± 0.019 — consistent with zero
accuracy Δ
−0.002
± 0.010 — consistent with zero
real test images
1,508
never touched by generation
synthetic / class
400
memorisation-gated
The result, reported as measured. Rare classes marked ● were the augmentation targets. The one on-target class whose gain clears its own spread in every seed is vasc. The largest effect in the whole experiment is off-target: melanoma recall +0.116, a class that was never augmented — paired with a −0.031 shift on the majority class nv. That signature is class rebalancing, not synthetic realism. Bars show the mean paired delta over 3 seeds; whiskers show ±1 SD.

A delta only means something when it clears both its own spread and the class's per-image quantum (1/support). Held to that rule, the honest summary of this experiment is: no macro effect, one small real on-target gain, one small real on-target loss, and a large off-target gain with a mundane explanation.

Melanoma sensitivity is the clinically critical metric in this domain, and +0.116 would have been the headline. The writeup declines to claim it, names the confound, and specifies the balance-matched control (oversampling real rare classes) needed to separate a rebalancing effect from a realism effect. The generation side is built to the same standard: every synthetic image passes memorisation gates before it may be used, and each one is tracked in a provenance manifest flagged synthetic: true.

source · github.com/shivpratapsinghpanwar/Synthetic_Data_Factory

05

Other applied work

KrishiDisha — a grounded agricultural assistant

IEEE 2025 first author 13-tool LLM loop offline fallback 150+ farmers

First-author work published at IEEE ICoEIT 2025: crop and fertilizer recommendation, leaf-photo disease detection, yield prediction, weather and live mandi prices behind one assistant. The assistant is not asked to know agronomy — it is handed thirteen tools and retrieval over the project's own knowledge base, so every answer traces back to a trained model or a dataset, and an offline rules engine keeps it answering with no API key or connectivity. Model choice was run as a seven-classifier comparison under 5-fold CV, not a single fit. Field-validated with 150+ farmers.

paper  · doi.org/10.1109/ICoEIT63558.2025.11211713
code   · github.com/shivpratapsinghpanwar/KrishiDisha.ai

Clinical computer vision

details withheld

Perception for a medical screening robot. Details withheld.

06

Publications

KrishiDisha: Revolutionizing Agriculture with Intelligent Recommendations, Disease Detection, and Yield Prediction
First author · 2025 IEEE International Conference on Engineering Innovations and Technologies (ICoEIT), pp. 1028–1040 · doi.org/10.1109/ICoEIT63558.2025.11211713
Web-BCD: A Machine and Deep Learning Approach for Breast Cancer Detection
IBM Technical Report, Dec 2024 · detection accuracy 89% → 94%, ROC-AUC 0.96 · deployed live for clinician use
A Review on Understanding the Patterns of Student Dropout
First author · Studies in Smart Technologies, Springer, pp. 235–250, 2025 · doi.org/10.1007/978-981-97-9006-7_20