<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Asser AboElkhair</title>
    <description>The latest articles on DEV Community by Asser AboElkhair (@asser_pai).</description>
    <link>https://dev.to/asser_pai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4265304%2Fd4e2ed90-11d3-44d1-bcc7-cfb9b1cec8d4.jpg</url>
      <title>DEV Community: Asser AboElkhair</title>
      <link>https://dev.to/asser_pai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asser_pai"/>
    <language>en</language>
    <item>
      <title>MagniData: brush one axis of an image dataset, and everything follows (open source).</title>
      <dc:creator>Asser AboElkhair</dc:creator>
      <pubDate>Wed, 25 Nov 2026 18:49:04 +0000</pubDate>
      <link>https://dev.to/asser_pai/magnidata-brush-one-axis-of-an-image-dataset-and-everything-follows-open-source-3b4o</link>
      <guid>https://dev.to/asser_pai/magnidata-brush-one-axis-of-an-image-dataset-and-everything-follows-open-source-3b4o</guid>
      <description>&lt;p&gt;We open-sourced MagniData, the tool our computer-vision team uses to look inside image datasets before and after training. This post is what it does, how to try it in two minutes, and what it does not do yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Brush one axis, everything follows
&lt;/h2&gt;

&lt;p&gt;A training run gives you a number, say mIoU, and a curve. Neither tells you which images the model struggles with, or what those images have in common. MagniData's answer is a linked view: parallel coordinates over every per-image metric, histograms, a table, an image / mask / overlay preview and a 3D embeddings view, all brushed together. Drag on one axis and every other view follows; narrow the band and only the surviving tiles stay lit; open one and you see the image, its mask and the overlay next to its numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys6u33r8mjrl4nu6opra.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys6u33r8mjrl4nu6opra.gif" alt="Brush one parallel-coordinates axis and every linked view follows" width="720" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faw98dk2nweki9v2j27r3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faw98dk2nweki9v2j27r3.png" alt="Visual Explorer on AgriStress-500" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8zuxqn8lfs1r4endo0oo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8zuxqn8lfs1r4endo0oo.png" alt="A field sample with its mask overlaid" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Hardness as a dataset axis
&lt;/h2&gt;

&lt;p&gt;With the full stack you can train a segmentation model from the dashboard (reference Tiny U-Net and LR-ASPP presets; optional AgriTune frozen-feature presets). After each scored epoch the model re-scores every image, and the per-image loss of each term is stored. MagniData turns those files into regular columns: &lt;code&gt;loss_&amp;lt;term&amp;gt;&lt;/code&gt;, its mean, delta and slope over epochs, a percentile &lt;code&gt;rank&lt;/code&gt; within the image's split, and &lt;code&gt;hardness&lt;/code&gt;, the share of scored epochs in which the image sat in the worst fifth of its split.&lt;/p&gt;

&lt;p&gt;Because those columns sit next to the photometric, geometric and embedding features, the common failure modes have a visible signature. Hard images that cluster on low sharpness or a narrow hue band point to a coverage gap. A high shape-loss rank with a low pixel-loss rank points at a coarse mask. High hardness with a flat slope, and a prediction that disagrees with the label when you open it, points at the annotation. The hardness and rank signals are heuristics for prioritising inspection, not proofs of label error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9unxfyh82ylhw8fwj7xw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9unxfyh82ylhw8fwj7xw.png" alt="Per-image loss axes from a run overlaid on the dataset" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From there: &lt;strong&gt;Save as dataset&lt;/strong&gt; keeps a brushed selection as a new dataset; &lt;strong&gt;Export relabel queue&lt;/strong&gt; hands the annotators the selected images hardest first; &lt;strong&gt;Complement&lt;/strong&gt; adds unseen images nearest to the selection's feature centroid; &lt;strong&gt;Train on it&lt;/strong&gt; reopens the Train dialog with the previous run's settings and records the parent run; &lt;strong&gt;Compare on dataset&lt;/strong&gt; puts the two runs side by side on that dataset (each run is still validated on its own split, so this is a side-by-side view, not yet a fair test of whether the curated set helped). Every derived dataset keeps its parents in the lineage graph.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqyepg8yr98y6z8sbqs18.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqyepg8yr98y6z8sbqs18.gif" alt="Brush the hardest tiles, complement them and save the selection as a new dataset" width="720" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspzu800ta3gizcfvhx8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspzu800ta3gizcfvhx8t.png" alt="Lineage graph" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What you get
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A feature extractor.&lt;/strong&gt; Point it at a folder of images, optionally with COCO-format segmentation annotations, and it writes one CSV: per-image sharpness (Laplacian, Tenengrad), noise, over- and under-exposure, contrast, dynamic range, luma entropy, colourfulness, white-balance gains, annotation coverage, instance counts, class entropy and a complexity score. An optional embeddings generator (DINOv2 by default) writes a matching JSON.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python -m precisionai.magnidata.tools.features --input data/mydata.csv --output out.csv
python -m precisionai.magnidata.tools.embeddings --input data/mydata.csv --output data/mydata.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;A Flask API&lt;/strong&gt; that serves images, masks and overlays, lists datasets, and runs PCA, t-SNE and LLE projection and clustering over the embeddings server-side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A React + Three.js dashboard&lt;/strong&gt; with the linked views above, and an Experiments page where runs on the same dataset are compared side by side (curves, best epoch, wall-clock time), with MLflow as the system of record.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it without installing anything
&lt;/h2&gt;

&lt;p&gt;The Hugging Face Space has COCO128 and AgriStress-500 (451 crop and weed field images with segmentation masks) already loaded: &lt;a href="https://huggingface.co/spaces/precisionaiinc/magnidata" rel="noopener noreferrer"&gt;https://huggingface.co/spaces/precisionaiinc/magnidata&lt;/a&gt;. It is a read-only demo on CPU, so dataset building and training are disabled there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run the whole thing
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Precision-AI-Inc/magnidata.git
&lt;span class="nb"&gt;cd&lt;/span&gt; magnidata
docker compose up --build
&lt;span class="c"&gt;# portal -&amp;gt; http://localhost:5175   api -&amp;gt; http://localhost:5051   mlflow -&amp;gt; http://localhost:5052&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four services come up: the dashboard, the API, an MLflow tracking server and a trainer worker (CPU by default; a compose override enables CUDA). The portal's User Guide walks from &lt;code&gt;docker compose up&lt;/code&gt; to a curated, retrained dataset with every command and screenshot. The training contract (tags, metric keys, artifact layout, per-sample loss CSV) is documented, so a trainer of your own can log runs that show up in the same Experiments view.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do yet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The hardness and rank signals are heuristics for prioritising inspection, not proofs of label error or of sufficient capacity. We have not yet published quantitative results on label-noise detection or on dataset-quality gains across benchmarks; that is the next evaluation.&lt;/li&gt;
&lt;li&gt;The complement step uses distance to a standardized feature centroid within a shared pool, not a per-image nearest-neighbour search.&lt;/li&gt;
&lt;li&gt;Parallel coordinates need axis grouping and ranking as column counts grow; very large plots render a deterministic 3,000-line representation while counts, tables and selections still use every row.&lt;/li&gt;
&lt;li&gt;Per-sample scoring costs one extra evaluation pass per scored epoch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bring your own data
&lt;/h2&gt;

&lt;p&gt;The data contract is a CSV with an &lt;code&gt;image_path&lt;/code&gt; column plus numeric and categorical columns, and an optional embeddings JSON keyed by image path. &lt;a href="https://github.com/Precision-AI-Inc/magnidata/blob/main/precisionai/magnidata/docs/data-contract.md" rel="noopener noreferrer"&gt;precisionai/magnidata/docs/data-contract.md&lt;/a&gt; and the "from images to dashboard" recipe in the repo cover it, and the portal's "Bring Your Own Data" dialog builds from an upload or from a folder you place under &lt;code&gt;image_sets/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/Precision-AI-Inc/magnidata" rel="noopener noreferrer"&gt;https://github.com/Precision-AI-Inc/magnidata&lt;/a&gt; (Apache-2.0). The five-page technical report in the repo describes the procedure and the four-model comparison: &lt;a href="https://github.com/Precision-AI-Inc/magnidata/blob/main/docs/paper/magnidata-technical-report.pdf" rel="noopener noreferrer"&gt;https://github.com/Precision-AI-Inc/magnidata/blob/main/docs/paper/magnidata-technical-report.pdf&lt;/a&gt;. If you try it on your own dataset, open an issue with what is missing; that is the feedback we want most.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>machinelearning</category>
      <category>computervision</category>
      <category>python</category>
    </item>
  </channel>
</rss>
