Mughees Ul Haq

I’m a machine learning engineer in Lahore. I train computer vision models, get them into production, and keep a log of the experiments along the way, including the ones that failed.

I’m a computer vision engineer in Lahore. I work on segmentation, keypoints and depth models, and I measure them at the resolution they run at in production.

I’m an AI engineer in Lahore. I connect language and vision models to tools, retrieval and labelling pipelines, and I put a benchmark behind each one.

I’m an automation engineer in Lahore. I turn manual and no-code processes into Python services that can be re-run safely.

I’m an engineer in Lahore working on OCR and automation. I read text off noisy real-world images and build the checks that run after it.

I’m a Python engineer in Lahore. I build FastAPI and Flask services around ML models, with config that fails at startup and logs you can trace.

I’m a computer engineer in Lahore. I’ve written FreeRTOS firmware on ESP32, read OBD-II data from cars, and tested it on the physical rig.

Portrait of Mughees Ul Haq

Selected work

If you’re here about a machine learning role, start with Face blur, Licence plates and Bin fill level.

If you’re here about a computer vision role, start with Face blur, Licence plates and Click-to-detect.

If you’re here about an AI engineering role, start with Local RAG assistant, Annotation and Click-to-detect.

If you’re here about an automation role, start with Automation, Local RAG assistant and Annotation.

If you’re here about an OCR and automation role, start with Automation, Annotation and Licence plates.

If you’re here about a Python backend role, start with Local RAG assistant, Automation and Bin fill level.

If you’re here about an embedded role, start with Vehicle health, Automation and Local RAG assistant.

A public photo of a kitchen with a framed picture outlined by the model at confidence 0.94.

01 / 04

Blurring family photos in property listings

from 49.8 to 81.2Frame F1 on 225 test photos. Old pipeline to my v7, original labels

Framed family photos in listing photos show real faces. I trained a segmentation model that outlines each frame with a face in it, so the blur covers the photo and leaves mirrors and TVs alone.

A public street photo with five number plates outlined by the delivered model.

02 / 04

Blurring licence plates in property photos

from 39 to 4Plates missed, out of 114. Deployed detector to my model, 82 test photos

A deployed detector was missing a third of the plates. One missing argument explained most of it. I fixed that, then trained a model that predicts each plate’s four corners.

Seedlings on soil, coloured by the first three dimensions of their DINOv3 patch features.

03 / 04

Click a few plants, find the rest of the field

about 0.82Detection F1, pea seedlings. 40 px targets

Click about five examples of a plant on a drone map and the tool searches the rest of the field for it. No training per field, and it runs on a laptop CPU.

A metric depth map of a public photo of a waste container, near in warm colours and far in cool ones.

04 / 04

Estimating how full a waste bin is from one camera frame

6.37 pointsMean error, Site A. Grouped 5-fold CV, 547 crops, image only

One camera frame in, a fill percentage out. Corners, then depth, then a regressor. The page also covers the better-looking number I chose not to quote.

Everything else

14 more projects: what each one does and what I measured, with the model on public photos where I have the weights.

A public photo of a house, tilted and then turned level by the model.

05A property-media platform

Straightening tilted property photos

from 0.684° to 0.557° Validation mean error

Reads the tilt of a photo to about half a degree. The last 18.6% came from more data, with the same model and code.

A public photo of a room with added noise, and the same photo after the student model.

06A property-media platform

Teaching a small model to denoise like a big one

from 17.9M to 5.2M Teacher → student

Swapped the old denoiser for SCUNet, then distilled it into a 5.2M-parameter student that runs on a CPU, with no clean training pairs.

A public aerial photo labelled drone by the scene classifier.drone 100%

07A property-media platform

Sorting photos into inside, outside and drone

98.90% Holdout accuracy, v3.2.0

A three-class router for the enhancement suite: 41 MB instead of 594 MB, 98.9% on a balanced holdout.

A public photo of a building under a grey sky, and the same photo with the sky replaced.

08A property-media platform

Replacing grey skies in exterior photos

from 324.4 to 163.7 MB Model size

A coarse mask, a guided filter and a refinement stage fused by confidence, so windows and reflections are left alone.

A public photo of a room with a warm colour cast, before and after white balance.

09A property-media platform

Colour correction with a lookup table made for each photo

under 30 MB Whole system

A 3D colour table predicted for every photo, with a white-balance network in front. Fixes to banding, controls and speed.

A dining table with a vase of flowers on it. A brush mask is drawn over the vase, with a dashed crop box and a colour-match ring around it. The vase is still in the photo.

10A property-media platform

Removing objects from photos without leaving a patch

unchanged Pixels outside the mask

Full-resolution crops, colour matching against a ring around the mask, and Poisson blending, so a removal stops showing as a patch.

Four public photos, each before and after one of the enhancements that run on the platform: denoising, sky, colour and straightening.

11A property-media platform

One runtime for eight image enhancements

8 Enhancements on it

A shared runtime for eight enhancements that deploys to four serving targets from reusable CI.

A green wheelie bin seen from above, with the four corners of its lid marked by hand and a dashed crop box around them.

12A waste-management operator

Finding the four corners of a bin

AP 0.010 April model on a new camera

An HRNet model that finds bin corners, the bugs I found in its training configs, and why AP 1.000 needs a footnote.

A dish of larvae with each larva outlined by the annotation pipeline, 509 in this frame.

13

AI-assisted annotation

10,130 Annotations

A vision-language model, SAM and plain image processing for the first pass, then labelling by hand: 10,130 annotations across four projects.

A public photo of a damaged car with each damaged area outlined and labelled by the damage model.

14Final-year project at ITU Lahore, rebuilt in 2026

Scoring a car’s condition from photos

0.792 Damage, test mask mAP50

Two segmentation models and a scoring formula that turn four photos of a car into a 0 to 10 health score.

A public aerial photo covered in boxes proposed by the class-agnostic detector.

15Farm-imagery research

Testing cheap shortcuts before an expensive training run

0 of 6 Gates passed

Six pass marks written down first. The best cheap route found 78% of objects and passed none of them.

A public photo of young plants in rows on bare soil.

16An agriculture client

Counting 23,005 pea seedlings without a neural network

23,005 Plants located

23,005 plants located in 14 seconds on a CPU with a vegetation index, no neural network.

17An internal tool and a client assistant rebuild

A local assistant that answers from a knowledge base

10 of 10 Routing benchmark

A question-answering service that runs on one machine: local model, local vector store, self-hosted search.

18A podcast-booking agency, a restoration-services client and others

Turning no-code workflows into Python services

from 3 workflows to 10 services Rewrite

Three n8n workflows rebuilt as ten Python services that can be re-run without sending anything twice.

Also in the run log

Photos in this section: Camp-Schweller House, Main Street, Wellingto… by w_lemay, CC BY-SA 2.0; Interior, Duncan House, Polymath Park, Acme,… by w_lemay, CC BY-SA 2.0; Aerial view of Cross Houses in Spring by AndySpeed, CC0; Arbury Hall (34337212276) by Elliott Brown from Birmingham, United Kingdom, CC BY-SA 2.0; Kitchen, Paul Schweiker House and Studio, Me… by w_lemay, CC BY-SA 2.0; Interior, Duncan House, Polymath Park, Acme,… by w_lemay, CC BY-SA 2.0; NIND Saint-Remi ISOH1 by Trougnouf, CC BY 4.0; Arbury Hall (34378442995) by Elliott Brown from Birmingham, United Kingdom, CC BY-SA 2.0; Munsell House, Park Street, South Royalton,… by w_lemay, CC BY-SA 2.0; Sustainable Kitchen - Flickr - Jeremy Levine… by Jeremy Levine from Los Angeles, United States, CC BY 2.0; Ryde Church Street house wheelie bin by Editor5807, CC BY 3.0; Oh deer! by Nyttend, Public domain; Lewis Taylor Farms seven months after Hurric… by USDAgov, Public domain; FARMERS GOV - Huerta del Valle - Community G… by USDAgov, Public domain; Kitchen, Paul Schweiker House and Studio, Me… by w_lemay, CC BY-SA 2.0; 1977-79 Toyota Corolla in an appaling "roadw… by Charlie from United Kingdom, CC BY 2.0; Bright orange wheelie bin outside Exxon by Ser Amantio di Nicolao, CC0. What I changed.

Experiments

I log my training runs and experiments, including the ones that went nowhere. 114 runs so far. I killed 35 of them.

Runs logged
114
Killed
35
Shipped
26
Each row is a project and each cell one logged run. Killed runs drop out of line. Shipped runs fill in red. Every run, with its setup and result.

fs.24 · Face blur · Killed

Tiling: the full negative result

F1 82.8 → 76.7

I gave tiling a proper test with seven strategies. Standard SAHI dropped F1 from 82.8 to 76.7 and recall from 80.9 to 71.7. A 2 × 2 grid with no overlap scored 76.9. Every tiled variant was worse than one pass over the whole image.

fl.12 · Bin fill level · Killed

Marigold V2 against Depth Anything V3

MAE 11.17 vs 6.37 (Site A), 11.49 vs 8.00 (Site B)

Marigold’s depth maps look sharper, so I tested it as a replacement. It was worse on both sites. The paired difference was +4.79 points [+3.38, +5.94] on Site A and +3.48 [+2.33, +4.64] on Site B. I kept Depth Anything V3.

kp.07 · Bin corners · Killed

RandomHalfBody: an augmentation that never ran

Never executed

Inherited from a human-pose config. It needs 11 keypoints in total and 8 in a half to trigger, and this model has 4. It had been configured, committed and carried across four client configs without running once. I removed it.

Read the full log

About

Portrait of Mughees Ul Haq
196 patches. A vision transformer such as DINOv3 cuts a photo into a grid like this and reads the patches as tokens.

I’m a machine learning engineer in Lahore. I studied computer engineering at ITU Lahore and have worked on production computer vision since June 2024, remotely with teams in Europe.

I quote numbers with the test set and conditions they came from.

More about me