<?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: deeplearning</title>
    <description>The latest articles tagged 'deeplearning' on DEV Community.</description>
    <link>https://dev.to/t/deeplearning</link>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tag/deeplearning"/>
    <language>en</language>
    <item>
      <title>Gemini 4 Argon: Google's AI Problem Solver</title>
      <dc:creator>Gian Paolo</dc:creator>
      <pubDate>Wed, 14 Oct 2026 07:08:02 +0000</pubDate>
      <link>https://dev.to/gp-ia-blog/gemini-4-argon-googles-ai-problem-solver-5526</link>
      <guid>https://dev.to/gp-ia-blog/gemini-4-argon-googles-ai-problem-solver-5526</guid>
      <description>&lt;h2&gt;
  
  
  The AI Whisperer: When a complex problem feels like an impossible knot, we often wish for a genius to untangle it. What if that genius isn't human? I'm talking about Google's latest brain child, Gemini 4 Argon, an AI model that's not just smart, it's designed to tackle the kind of multi-layered, ambiguous challenges that make us mere mortals sweat. Think less about generating pretty pictures and more about navigating a labyrinth of data to find the single correct path. (Ref: TuttoAndroid)
&lt;/h2&gt;

&lt;p&gt;When a complex problem feels like an impossible knot, we often wish for a genius to untangle it. What if that genius isn't human? I'm talking about Google's latest brain child, Gemini 4 Argon, an AI model that's not just smart, it's designed to tackle the kind of multi-layered, ambiguous challenges that make us mere mortals sweat. Think less about generating pretty pictures and more about navigating a labyrinth of data to find the single correct path.&lt;/p&gt;




&lt;p&gt;Imagine you're tasked with optimizing a city-wide supply chain. Hundreds of variables are in play: traffic patterns, warehouse inventory, fuel costs, delivery windows, and unexpected road closures. Each decision creates a ripple effect, and the ideal solution is buried under an avalanche of interconnected data. This is the exact kind of cognitive puzzle that has kept logisticians awake at night for decades. It’s also precisely the type of challenge Google has built its new AI model, Gemini 4 Argon, to solve.&lt;/p&gt;

&lt;p&gt;While much of the recent AI conversation has centered on creativity and conversation—models that can write a sonnet or debate philosophy—Argon represents a significant pivot. It’s an AI built for &lt;strong&gt;execution&lt;/strong&gt;. According to recent announcements, its core strength lies in deconstructing a massive, poorly defined problem into a series of smaller, logical steps that it can then solve sequentially &lt;a href="https://news.google.com/rss/articles/CBMimgFBVV95cUxQSDNaQkpPVTFKWjBLQWg2bGUxaC1LSHhudUJFdXV4akhYS3VoWVNsdmQ3VXhva3pYdnk2THFjOGpsQUY3a1ozVWJ4MUhnNWpXVWdLNDhkMG1OVmNMeUJkdUktWHVTd2hFeXZ5bV9ndkpmUWpvU2E5WVpQYlMtV2xCYmp0U1Nfc0puNTNiWDJ0M3Yyc2dlME96M1dR?oc=5" rel="noopener noreferrer"&gt;Google lancia Gemini 4 Argon, il nuovo modello IA che risolve problemi complessi - TuttoAndroid&lt;/a&gt;. It acts less like a creative partner and more like a tireless strategic analyst.&lt;/p&gt;

&lt;p&gt;Think of it this way: if you ask a standard AI to plan a vacation, it might give you a beautiful itinerary. If you give the same task to Argon, it would likely start by asking for your budget, checking flight prices in real-time, cross-referencing hotel availability with your preferred dates, analyzing reviews for the best local restaurants, and then presenting a logically optimized plan complete with booking links. The focus isn't on the prose, but on the process.&lt;/p&gt;

&lt;p&gt;This ability to operate with a higher degree of autonomy is what sets it apart. Instead of requiring constant human prompting for each micro-task, Argon is designed to understand the overarching goal and chart its own course through the data labyrinth. It can identify the necessary sub-tasks, execute them, and use the results to inform its next move. This makes it a powerful tool for fields drowning in complexity, from scientific research and financial modeling to software development and engineering.&lt;/p&gt;

&lt;p&gt;So while other AIs are learning to paint, Argon is learning to think strategically. It isn't here to replace human ingenuity but to augment it, offering a powerful cognitive tool to untangle the gnarliest knots we can find. It’s a quiet but profound shift, suggesting a future where our most daunting problems have a new kind of mind working on them—one that never gets tired, never overlooks a variable, and is built from the ground up to find the way through.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond the Buzzwords: Deconstructing Argon's 'Complex Problem Solving' Superpower. This isn't just about faster calculations or bigger datasets. Argon reportedly brings a new level of autonomy and multi-modal reasoning to the table. We’ll dive into what Google means by 'complex problems' – from scientific discovery and intricate logistical planning to perhaps even ethical dilemmas in AI development itself. How does its architecture enable this leap, and what specific capabilities differentiate it from previous Gemini iterations? (Ref: HDblog.it)
&lt;/h2&gt;

&lt;p&gt;When Google labels its new model, Gemini 4 Argon, a "complex problem solver," it’s easy to picture a supercharged calculator running equations faster than ever. But that misses the point entirely. The shift Argon represents is not about the speed of calculation but the nature of the inquiry itself. This is about endowing an AI with the ability to take a vague, high-level goal and independently chart a course to a solution.&lt;/p&gt;

&lt;p&gt;Argon's defining feature appears to be a new level of operational autonomy. It's a move away from the simple prompt-and-response loop that has defined large language models. As noted in early reports, the goal is an AI that becomes more autonomous, capable of breaking down a multifaceted problem into a series of logical steps, gathering the necessary information, and executing those steps without constant human intervention [&lt;a href="https://news.google.com/rss/articles/CBMikAFBVV95cUxNV2l3TTJPYUpWWWNYWTlpZzlIZElhV255RWN4dVVfVUdZSFFfVjhfdW9mQVJ2ZHo0ZjFzUkc3cU9aTDcyVThtSGVKQ09rZm1faUp5Mks2ZE9HSTUtSm9RbkhLNW8xS0dQcEZ4NzdKNGJNenZ6SnZMcnI1Tk5CdGI4UDRwSGllWjNBSlNfY2k2RG8?oc=5" rel="noopener noreferrer"&gt;Google lancia Gemini 4 Argon: l'AI diventa più autonoma - HDblog.it&lt;/a&gt;].&lt;/p&gt;

&lt;p&gt;This capability is reportedly enabled by a more integrated, multi-modal reasoning architecture. Think of it less as a single, massive brain and more as an expert project manager with a team of specialists. When faced with a problem, Argon can orchestrate different internal "agents"—one that excels at code generation, another at interpreting satellite imagery, a third at parsing financial reports. This allows it to tackle problems that are not just computationally difficult, but are also messy, ambiguous, and span multiple domains.&lt;/p&gt;

&lt;p&gt;Let's take a concrete example: optimizing a global logistics network. A previous Gemini iteration could brilliantly analyze a spreadsheet of shipping times and fuel costs to identify inefficiencies. You would have to provide it with clean data and ask a specific question. Argon, in contrast, could be given a far broader directive: "Reduce our international shipping carbon footprint by 20% within the next year without increasing costs by more than 5%."&lt;/p&gt;

&lt;p&gt;To solve this, Argon wouldn't just look at a spreadsheet. It would formulate a strategy. It might pull real-time maritime traffic data, cross-reference it with long-range weather forecasts to predict storm-related delays, analyze international fuel price fluctuations, and even interpret satellite photos of port congestion. It could then generate multiple simulated scenarios—re-routing ships, consolidating cargo, shifting to different transport methods—and present a fully-fledged plan, complete with the Python code needed to implement the new routing software.&lt;/p&gt;

&lt;p&gt;This is the leap. The complexity isn't just in the data; it's in the real-world variables and the need for a coherent, multi-step plan. Google’s ambition for Argon seems to extend even further, into abstract and ethical domains. Could it be tasked with modeling the potential societal impacts of a new AI-powered public policy, identifying potential biases or unforeseen consequences before they are implemented? This suggests a capacity for meta-reasoning that goes far beyond simple pattern recognition.&lt;/p&gt;

&lt;p&gt;The critical differentiator, then, is the shift from reactive analysis to &lt;strong&gt;proactive strategy&lt;/strong&gt;. Previous models could tell you what happened or predict what might happen based on past data. Argon is being built to chart a course for what to do next.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI Arena: Argon vs. The Titans. We've seen formidable players like ChatGPT Astra and Claude Fable push boundaries, but where does Argon fit in the competitive landscape? I'll break down the key technical and functional differences. Is Argon truly a step ahead in terms of reasoning, planning, or its ability to handle unstructured, real-world data? We'll assess specific use cases where Argon might outshine its rivals and where it might face similar limitations. (Ref: Corriere della Sera)
&lt;/h2&gt;

&lt;p&gt;The artificial intelligence landscape has become a clash of titans, and with Google’s release of Gemini 4 Argon, a new contender has stepped into the ring. We’ve grown accustomed to the impressive conversational and creative abilities of models like OpenAI’s ChatGPT Astra and Anthropic’s Claude Fable. They can write poetry, summarize dense reports, and, in Astra's case, even narrate the world through a phone's camera. But Argon is playing a different game. It’s less about conversation and more about conclusion.&lt;/p&gt;

&lt;p&gt;Google is positioning Argon not as a better chatbot, but as a more autonomous problem-solver. The primary distinction lies in its architecture, which is geared toward &lt;strong&gt;reasoning and planning&lt;/strong&gt;. While other leading models respond brilliantly to direct prompts, Argon is designed to take a complex, multi-step goal and independently map out a path to achieve it. It deconstructs a problem into a sequence of logical tasks, a skill that moves it closer to an "agent" that does things, rather than an "oracle" that knows things.&lt;/p&gt;

&lt;p&gt;This becomes clear when you consider its ability to process unstructured, real-world data. Imagine you need to organize a corporate retreat. You could give ChatGPT a list of requirements and ask it to draft an itinerary. It would do a fine job. With Argon, the promise is that you can hand it a messy folder containing a mix of PDF quotes from caterers, a spreadsheet of attendee flight times, and a jumble of email threads discussing potential venues. Argon’s objective isn't just to summarize this data, but to synthesize it into a coherent plan. It’s meant to identify conflicts—like a keynote speaker landing after the welcome dinner begins—and flag missing information without being explicitly prompted for each step.&lt;/p&gt;

&lt;p&gt;This is where Argon could outshine its rivals. In use cases like logistics management, financial auditing, or scientific research, the core challenge is not a single question but a cascade of interdependent tasks. Argon is built to manage that cascade. According to reports like one from the &lt;a href="https://news.google.com/rss/articles/CBMingJBVV95cUxOZGtmcGhWcTZFZHFNLVlqMjlLZW5oNzJOR3JaeWtBRG1ETVVBZm9NcTdSUmVvSmpEeGNZcDBvd3N5ZUlFbWxoeEZTMk0zN0NtX2dhN3RoZkRmZlNRbVZsc01NU05XQkV1cEMxMXhTVnljbHN1bEFNb1FKSE9qUm5hN3pZeTdCTEFUajJ2RmpWMWpZcElEV0ZPemJNR1pkYzhBYkRNMjNEbDdvNllYSkl4NkphekQxc3M2dmEzcHhQU3VvV3lKRVlHOWg1TEt3TjZ1T2VMMEY5Z0dRYjhJNVJHMkViQnlUN3hJVTE4Q0FhYm9sQVdDTndReHJKYjI4NFlReThBNHFabk1kQXBvVlgxSFItbHo0OFNLMEFOUTJR0gGjAkFVX3lxTE5SRDF3WVh6NjBJOGRvTFV1bFo0T2NpcHpBb2piREZ1SGhTRFNqRFZvNlluRVlpMDk1am9vemdWUG92a2gyWWpxMlJvRFJRR0Y3MERERlNVZW9nQ3gwbU5Ib2NzeU5hb25hT0pNRmlFY2c4RF9XWDJaMTRwLTd2dXV6enhYMmpmOWJ3RFRVWXBOS3JENnp1T0dPazB5ZGRXZVBYeDZYN2JkeE56aXhraVpKNnVYZlBsRGJLdHFiblVzYmc1ZldyajBhU29XaWZmb19weTdMU3hlZGt2TUV4ZDNHbWVMM29sU1RNMUVJcDI4dWEzSDFjVzJDdWg0RzNEZXFlSzlsM1dxMmlQczdFX1NLeGctQUtxeUowTGxxTm5ZYjBLdw?oc=5" rel="noopener noreferrer"&gt;Corriere della Sera&lt;/a&gt;, the challenge among these tech giants is rapidly shifting towards practical, real-world application, and Argon is Google's answer to that pressure.&lt;/p&gt;

&lt;p&gt;However, Argon is not immune to the fundamental limitations of current AI. Increased autonomy brings an increased risk of complex, hard-to-diagnose errors. A flawed plan executed autonomously could create bigger problems than a simple conversational mistake. Furthermore, it still lacks true common-sense understanding, meaning its logical plans could overlook obvious, real-world context that a human would catch instantly.&lt;/p&gt;

&lt;p&gt;So, is Argon truly a step ahead? Perhaps not in every metric, but it represents a significant strategic divergence. While its competitors refine the human-AI interface to be more intuitive and conversational, Google is pushing its model to operate with greater independence on the back end. Argon isn’t just joining the conversation with the titans; it’s trying to change the subject from talking to doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Impact: From Labs to Livelihoods. Forget abstract benchmarks. What does Argon mean for industries grappling with truly hard problems? Imagine its potential in drug discovery, climate modeling, or even optimizing global supply chains under unpredictable conditions. I'll explore hypothetical (and perhaps soon-to-be-real) scenarios where Argon could offer solutions previously unimaginable, transforming how we approach intractable challenges. This is where the rubber meets the road.
&lt;/h2&gt;

&lt;p&gt;The true measure of an AI isn't how well it performs on a curated test but whether it can untangle the messy, chaotic problems of the real world. While benchmarks are useful, they don't capture the friction of reality. This is the domain Google appears to be targeting with Argon. Its purported strength isn't just answering questions, but structuring and solving problems with countless moving parts and incomplete information.&lt;/p&gt;

&lt;p&gt;Consider the fragility of global supply chains. A single container ship stuck in a canal or an unexpected port shutdown can trigger cascading delays costing billions. Humans, even with powerful computers, react to these crises. They reroute ships, adjust schedules, and manage the fallout. Argon’s potential lies in its ability to not just react, but to proactively and holistically re-optimize the entire system in near real-time.&lt;/p&gt;

&lt;p&gt;Imagine a major shipping hub in Southeast Asia closes without warning due to a sudden political event. For a global logistics company, this is a nightmare. Thousands of containers are affected. Argon wouldn't just look for the next closest port. It would simultaneously analyze oceanic weather patterns, the real-time fuel price fluctuations for its entire fleet, the specific priority level of every single container, and the downstream manufacturing deadlines in Europe and North America that depend on them.&lt;/p&gt;

&lt;p&gt;Instead of a simple one-to-one rerouting, it might propose a complex, multi-part solution: &lt;strong&gt;divert 40% of ships&lt;/strong&gt; to a smaller, less conventional port in Australia, chartering local short-range vessels to shuttle the most critical cargo onward. It could advise that 30% of ships should slow their speed to conserve fuel and wait for the situation to resolve, calculating that the delay cost is less than the cost of rerouting to an already congested port. The remaining 30% might be sent on a longer, unconventional route around Africa, a path that only becomes economical because of a temporary dip in fuel prices Argon identified.&lt;/p&gt;

&lt;p&gt;This is fundamentally different from current logistics software. It’s not about finding the next best option; it's about re-imagining the entire operational landscape based on a dynamic flood of data. This capacity for autonomous problem-solving is what Italian tech outlet &lt;a href="https://news.google.com/rss/articles/CBMikAFBVV95cUxNV2l3TTJPYUpWWWNYWTlpZzlIZElhV255RWN4dVVfVUdZSFFfVjhfdW9mQVJ2ZHo0ZjFzUkc3cU9aTDcyVThtSGVKQ09rZm1faUp5Mks2ZE9HSTUtSm9RbkhLNW8xS0dQcEZ4NzdKNGJNenZ6SnZMcnI1Tk5CdGI4UDRwSGllWjNBSlNfY2k2RG8?oc=5" rel="noopener noreferrer"&gt;HDblog.it&lt;/a&gt; noted in its initial coverage, highlighting how the AI is designed to become more independent in its operation.&lt;/p&gt;

&lt;p&gt;The same logic applies elsewhere. In drug discovery, Argon could model the near-infinite ways proteins can fold and interact with new compounds, flagging promising candidates that human researchers might miss over a lifetime of work. For climate scientists, it could run simulations of atmospheric and oceanic feedback loops with a level of complexity that is currently computationally prohibitive, giving us a clearer picture of our planet’s future. These are not simple queries. They are vast, tangled systems, and it's here, in the midst of this complexity, that Argon's true impact may be felt.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Double-Edged Sword: Autonomy, Complexity, and Control. As AI models like Argon become more autonomous and capable of tackling incredibly complex problems, the question of control and ethical oversight looms larger. What are the inherent risks when an AI can reason and plan with such advanced capabilities? We'll ponder the tightrope walk between leveraging this immense power for good and ensuring we maintain a firm hand on the tiller, preventing unintended consequences as AI becomes an increasingly independent problem solver.
&lt;/h2&gt;

&lt;p&gt;The very thing that makes Google’s new Argon model so potent is also what introduces a profound sense of unease: its autonomy. Previous models followed instructions, executing tasks within tightly defined parameters. Argon, however, is designed to deconstruct a problem, formulate a multi-step plan, and execute it with minimal human intervention. As reports have noted since its release, the clear trajectory is that &lt;a href="https://news.google.com/rss/articles/CBMikAFBVV95cUxNV2l3TTJPYUpWWWNYWTlpZzlIZElhV255RWN4dVVfVUdZSFFfVjhfdW9mQVJ2ZHo0ZjFzUkc3cU9aTDcyVThtSGVKQ09rZm1faUp5Mks2ZE9HSTUtSm9RbkhLNW8xS0dQcEZ4NzdKNGJNenZ6SnZMcnI1Tk5CdGI4UDRwSGllWjNBSlNfY2k2RG8?oc=5" rel="noopener noreferrer"&gt;AI is becoming more autonomous&lt;/a&gt;, shifting from a tool that answers questions to an agent that accomplishes goals.&lt;/p&gt;

&lt;p&gt;This leap forward presents a classic double-edged sword. On one side, we have an unprecedented capacity for solving systemic challenges—optimizing power grids to reduce waste, modeling complex protein folding for drug discovery, or untangling global supply chain knots. Argon can identify variables and pathways that a team of human experts might miss over a lifetime of study. It can reason through immense causal chains, connecting seemingly disparate events to find a solution.&lt;/p&gt;

&lt;p&gt;But the other edge is sharp and unpredictable. The inherent risk lies in the gap between a stated goal and the model's interpretation of the optimal path to achieve it. What happens when an AI, tasked with "reducing urban traffic congestion by 15%," devises a plan that involves rerouting all emergency services along slower, secondary roads to free up major arteries? The logic is sound from a purely mathematical standpoint, but it’s a solution devoid of human context and values. The danger isn’t malice; it's a form of &lt;strong&gt;hyper-logical indifference&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This forces a fundamental shift in our concept of AI control. The old methods of content filters and hardcoded rules are insufficient for a system that can strategize. The challenge becomes one of value alignment: how do we embed nuanced, often contradictory, human ethics into a system of logic? We're no longer just programming a machine; we are attempting to instill a philosophy. The tightrope walk is between giving Argon enough freedom to find novel solutions and ensuring its problem-solving space is bounded by non-negotiable ethical guardrails.&lt;/p&gt;

&lt;p&gt;As Argon begins tackling real-world problems, its reasoning process could become a black box. We can see the inputs and the final outputs, but the intricate, multi-layered "why" behind its strategy may be too complex for us to fully audit or comprehend. We are building an increasingly independent problem solver, moving our role from that of an operator to that of a supervisor, and eventually, perhaps, just a beneficiary—or a victim—of its conclusions. Google has given us a tool that can provide answers. The question now is whether we will always be comfortable with how it gets there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://news.google.com/rss/articles/CBMimgFBVV95cUxQSDNaQkpPVTFKWjBLQWg2bGUxaC1LSHhudUJFdXV4akhYS3VoWVNsdmQ3VXhva3pYdnk2THFjOGpsQUY3a1ozVWJ4MUhnNWpXVWdLNDhkMG1OVmNMeUJkdUktWHVTd2hFeXZ5bV9ndkpmUWpvU2E5WVpQYlMtV2xCYmp0U1Nfc0puNTNiWDJ0M3Yyc2dlME96M1dR?oc=5" rel="noopener noreferrer"&gt;Google lancia Gemini 4 Argon, il nuovo modello IA che risolve problemi complessi - TuttoAndroid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://news.google.com/rss/articles/CBMikAFBVV95cUxNV2l3TTJPYUpWWWNYWTlpZzlIZElhV255RWN4dVVfVUdZSFFfVjhfdW9mQVJ2ZHo0ZjFzUkc3cU9aTDcyVThtSGVKQ09rZm1faUp5Mks2ZE9HSTUtSm9RbkhLNW8xS0dQcEZ4NzdKNGJNenZ6SnZMcnI1Tk5CdGI4UDRwSGllWjNBSlNfY2k2RG8?oc=5" rel="noopener noreferrer"&gt;Google lancia Gemini 4 Argon: l'AI diventa più autonoma - HDblog.it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://news.google.com/rss/articles/CBMingJBVV95cUxOZGtmcGhWcTZFZHFNLVlqMjlLZW5oNzJOR3JaeWtBRG1ETVVBZm9NcTdSUmVvSmpEeGNZcDBvd3N5ZUlFbWxoeEZTMk0zN0NtX2dhN3RoZkRmZlNRbVZsc01NU05XQkV1cEMxMXhTVnljbHN1bEFNb1FKSE9qUm5hN3pZeTdCTEFUajJ2RmpWMWpZcElEV0ZPemJNR1pkYzhBYkRNMjNEbDdvNllYSkl4NkphekQxc3M2dmEzcHhQU3VvV3lKRVlHOWg1TEt3TjZ1T2VMMEY5Z0dRYjhJNVJHMkViQnlUN3hJVTE4Q0FhYm9sQVdDTndReHJKYjI4NFlReThBNHFabk1kQXBvVlgxSFItbHo0OFNLMEFOUTJR0gGjAkFVX3lxTE5SRDF3WVh6NjBJOGRvTFV1bFo0T2NpcHpBb2piREZ1SGhTRFNqRFZvNlluRVlpMDk1am9vemdWUG92a2gyWWpxMlJvRFJRR0Y3MERERlNVZW9nQ3gwbU5Ib2NzeU5hb25hT0pNRmlFY2c4RF9XWDJaMTRwLTd2dXV6enhYMmpmOWJ3RFRVWXBOS3JENnp1T0dPazB5ZGRXZVBYeDZYN2JkeE56aXhraVpKNnVYZlBsRGJLdHFiblVzYmc1ZldyajBhU29XaWZmb19weTdMU3hlZGt2TUV4ZDNHbWVMM29sU1RNMUVJcDI4dWEzSDFjVzJDdWg0RzNEZXFlSzlsM1dxMmlQczdFX1NLeGctQUtxeUowTGxxTm5ZYjBLdw?oc=5" rel="noopener noreferrer"&gt;Google lancia Gemini 4 Argon: chi può usare il nuovo modello AI che sfida ChatGpt Astra e Claude Fable - Corriere della Sera&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>Is the RTX 5090 enough for AI? RTX PRO 6000 Blackwell vs RTX 5090 compared</title>
      <dc:creator>Prateek Navani</dc:creator>
      <pubDate>Tue, 13 Oct 2026 14:31:09 +0000</pubDate>
      <link>https://dev.to/prateek_navani_157c1ed2b7/is-the-rtx-5090-enough-for-ai-rtx-pro-6000-blackwell-vs-rtx-5090-compared-585k</link>
      <guid>https://dev.to/prateek_navani_157c1ed2b7/is-the-rtx-5090-enough-for-ai-rtx-pro-6000-blackwell-vs-rtx-5090-compared-585k</guid>
      <description>&lt;p&gt;If you are shopping for a GPU to run AI workloads right now, you have probably landed on the same two names everyone else does. The RTX 5090 because it is the flagship consumer card, and the RTX PRO 6000 Blackwell because someone in a forum told you it is what "serious" AI teams actually use.&lt;br&gt;
I have gone through the specs, the pricing, and the real workload limits on both cards, and the honest answer is that neither one is automatically the right pick. It depends entirely on what you are training, how much memory your models actually need, and whether you plan to run this on a desk or in a server rack. Let me walk you through it properly.&lt;br&gt;
Why does this question even come up for AI work specifically?&lt;br&gt;
Because gaming GPUs and AI GPUs get judged on completely different things. For gaming, clock speed and frame rates matter most. For AI, memory capacity and memory bandwidth decide almost everything.&lt;br&gt;
The RTX 5090 is an excellent gaming card. That part is not in question. What is in question is whether its memory setup, built primarily for 4K gaming and content creation, holds up once you point it at real model training or large scale inference.&lt;br&gt;
What actually changed with the RTX 5090 compared to the previous generation?&lt;br&gt;
The RTX 5090 ships with 32GB of GDDR7 VRAM on a 512-bit bus, delivering close to 1.79 TB/s of memory bandwidth. That is a real jump from the RTX 4090's 24GB and roughly 1 TB/s. It also carries 21,760 CUDA cores, a sizeable increase over the previous flagship.&lt;br&gt;
It launched in January 2025 at a $1,999 MSRP. By mid-2026, GDDR7 supply shortages have pushed street prices well past that, often into the $3,000 to $5,000 range depending on the model and availability.&lt;br&gt;
What can the RTX 5090 actually handle for AI work?&lt;br&gt;
Quite a lot, honestly. This is where I think a lot of people underestimate it.&lt;br&gt;
Fine-tuning models in the 7B to 30B parameter range with reasonable batch sizes&lt;br&gt;
Running inference on quantized versions of 70B+ parameter models&lt;br&gt;
Handling high resolution image and video generation pipelines without constant memory errors&lt;br&gt;
Serving as a genuinely capable single-GPU inference box for smaller production workloads&lt;br&gt;
For a solo developer, a researcher, or a small team experimenting with open source models, 32GB covers a surprising amount of ground.&lt;br&gt;
Where does the RTX 5090 start to struggle?&lt;br&gt;
Three places, consistently.&lt;br&gt;
Unquantized 70B+ models: A 70B model in 4-bit quantization needs roughly 35 to 40GB, which is already tighter than the 5090's 32GB. Full precision work on models that size is not realistic on a single card.&lt;br&gt;
No NVLink: The RTX 5090 is a PCIe-only card. Multi-GPU setups do not pool memory automatically, so scaling beyond one card for large training runs gets messy fast.&lt;br&gt;
Licensing: It runs under Nvidia's consumer GeForce EULA, which restricts formal data center deployment. That matters if you are building something you plan to run commercially at scale, not just on your own desk.&lt;br&gt;
What is the RTX PRO 6000 Blackwell, and how different is it really?&lt;br&gt;
Here is the part that surprises people. The RTX PRO 6000 Blackwell uses the exact same GB202 die as the RTX 5090. The difference is almost entirely in memory, reliability features, and licensing, not the underlying silicon.&lt;br&gt;
It ships with 96GB of ECC GDDR7 VRAM, a dedicated NVLink connector on multi-GPU configurations, and full data center EULA compliance. It launched in March 2025 at roughly $8,565 and has climbed to around $13,250 by August 2026, again driven by GDDR7 shortages rather than any change to the card itself.&lt;br&gt;
What does the extra VRAM actually let you do?&lt;br&gt;
This is the number that matters most for anyone doing real model work.&lt;br&gt;
Spec&lt;br&gt;
RTX 5090&lt;br&gt;
RTX PRO 6000 Blackwell&lt;br&gt;
VRAM&lt;br&gt;
32GB GDDR7&lt;br&gt;
96GB ECC GDDR7&lt;br&gt;
CUDA cores&lt;br&gt;
21,760&lt;br&gt;
24,064&lt;br&gt;
Memory bandwidth&lt;br&gt;
~1.79 TB/s&lt;br&gt;
~1.8 TB/s&lt;br&gt;
NVLink support&lt;br&gt;
No&lt;br&gt;
Yes (multi-GPU configs)&lt;br&gt;
ECC memory&lt;br&gt;
No&lt;br&gt;
Yes&lt;br&gt;
Licensing&lt;br&gt;
Consumer EULA&lt;br&gt;
Data center EULA&lt;br&gt;
Launch price&lt;br&gt;
$1,999&lt;br&gt;
$8,565&lt;br&gt;
Mid-2026 street price&lt;br&gt;
$3,000 to $5,000+&lt;br&gt;
Around $13,250&lt;/p&gt;

&lt;p&gt;With 96GB, a single RTX PRO 6000 Blackwell can run 70B parameter models at FP8 precision without quantization tricks. Pair two of them with NVLink and you get 192GB of pooled memory, enough for full unquantized 70B inference and genuinely serious fine-tuning work.&lt;br&gt;
RTX 5090 vs RTX PRO 6000 Blackwell: who is each one actually built for?&lt;br&gt;
Once you lay the specs side by side, the split becomes fairly obvious.&lt;br&gt;
RTX 5090 fits solo builders, students, small teams, and anyone prototyping on personal or side project budgets&lt;br&gt;
RTX PRO 6000 Blackwell fits teams running production inference, fine-tuning larger open models, or anyone who needs ECC memory and proper data center compliance&lt;br&gt;
If you are building alone or just experimenting, which one makes sense?&lt;br&gt;
The RTX 5090, almost every time. Unless you specifically need to run unquantized 70B+ models today, 32GB will cover fine-tuning, quantized inference, and generative media work without forcing you into a much larger budget.&lt;br&gt;
If you are running this for a team or a product, which one makes sense?&lt;br&gt;
This is usually where the calculation flips. Once you are serving production traffic, working with datasets that need ECC reliability, or planning to deploy in an actual data center environment, the licensing and memory ceiling on the RTX 5090 start working against you. That is exactly the gap the RTX PRO 6000 Blackwell was built to close.&lt;br&gt;
Is renting a better option than buying either one?&lt;br&gt;
For a lot of teams, yes, at least early on. Cloud pricing for the RTX 5090 currently runs somewhere between $0.29 and $0.85 per GPU hour depending on the provider, with a market median sitting around $0.46 to $0.72. That lets you test whether 32GB is genuinely enough for your workload before committing thousands of dollars to hardware you might outgrow in six months.&lt;br&gt;
If you already know you need 96GB and ECC memory, renting an RTX PRO 6000 Blackwell instance is often more practical than buying one outright, especially with current prices sitting well above launch.&lt;br&gt;
My honest take&lt;br&gt;
If you are still deciding between these two, ask yourself one question first. Do you need to run models above 30 to 40 billion parameters without quantization, or do you need ECC memory and data center compliance right now?&lt;br&gt;
If the answer is no, the RTX 5090 will serve you well and save you a significant amount of money. If the answer is yes, the RTX PRO 6000 Blackwell earns its price tag, and trying to force the 5090 into that role will likely cost you more in wasted time than the price difference between the two cards.&lt;br&gt;
Frequently asked questions&lt;br&gt;
Is the RTX 5090 actually usable for serious AI work, or is it just a gaming card? &lt;br&gt;
It is genuinely usable. The 32GB of VRAM and high bandwidth make it capable for fine-tuning smaller models and running quantized inference on larger ones. It is not a data center card, but it is far from just a gaming GPU.&lt;br&gt;
Why is the RTX PRO 6000 Blackwell so much more expensive if it uses the same core chip? &lt;br&gt;
The price difference comes almost entirely from the memory. 96GB of ECC GDDR7, NVLink support, and data center licensing cost significantly more to produce and certify than the consumer configuration, and GDDR7 shortages have pushed both cards' prices up regardless.&lt;br&gt;
Can I just buy two RTX 5090s instead of one RTX PRO 6000 Blackwell? &lt;br&gt;
Not really in the way people hope. Since the RTX 5090 has no NVLink, two cards do not pool memory the way a dual RTX PRO 6000 Blackwell setup does. You get two separate 32GB pools, not one larger one, which limits what you can actually run across them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>deeplearning</category>
      <category>hardware</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How AI Image Generators Work: I Trained a Diffusion Model From Scratch on My Laptop</title>
      <dc:creator>RainyTech</dc:creator>
      <pubDate>Tue, 13 Oct 2026 13:54:18 +0000</pubDate>
      <link>https://dev.to/rainytechlab/how-ai-image-generators-work-i-trained-a-diffusion-model-from-scratch-on-my-laptop-51mf</link>
      <guid>https://dev.to/rainytechlab/how-ai-image-generators-work-i-trained-a-diffusion-model-from-scratch-on-my-laptop-51mf</guid>
      <description>&lt;p&gt;I trained an AI to draw on my laptop, from scratch. At the start it could only make noise. About 35 minutes later it was drawing robots that never existed.&lt;/p&gt;

&lt;p&gt;It works the same way as Stable Diffusion and Midjourney: the model learns to turn noise into pictures. Then I let it train itself on its own best drawings, and it learned to cheat.&lt;/p&gt;

&lt;p&gt;This post walks through the whole thing: the code, the math, and the real numbers from my run. The full video lesson is here: &lt;a href="https://youtu.be/19Omz2cwFuY" rel="noopener noreferrer"&gt;https://youtu.be/19Omz2cwFuY&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/19Omz2cwFuY" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The setup:&lt;/strong&gt; about 120 lines of Python + PyTorch, a small U-Net with 2,142,851 weights, trained on a Mac GPU.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. A picture is just numbers
&lt;/h2&gt;

&lt;p&gt;A computer can't see a picture. It sees numbers. Each robot in my dataset is 64 × 64 pixels, and each pixel has three numbers (red, green, blue). So one small robot is &lt;strong&gt;12,288 numbers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before training, every number goes from the range 0–255 to the range −1 to 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;imgs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/robots64.npy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;permute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 8000 × 3 × 64 × 64
&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;imgs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;127.5&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;                                          &lt;span class="c1"&gt;# pixels 0..255 -&amp;gt; -1..1
&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.9&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;:]&lt;/span&gt;                                  &lt;span class="c1"&gt;# 10% held back to test honestly
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why −1 to 1? Neural networks learn best when numbers sit around zero, and it's the same range as the random noise we'll add later. A pixel with red = 75 becomes −0.412.&lt;/p&gt;

&lt;p&gt;I then hid 10% of the images as an honest test: &lt;strong&gt;7,200 robots for training, 800 the model never sees.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Where the 8,000 robots came from
&lt;/h2&gt;

&lt;p&gt;I drew them myself, with code. Each robot gets a random size, pose, colour, mood and background, drawn with Python's image library: rounded rectangles for the head and body, circles for the eyes. No two are the same, so the model can't copy one picture. It has to learn what a robot &lt;em&gt;is&lt;/em&gt;. It also means no one else's images were used.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Destroy the pictures with noise (the forward process)
&lt;/h2&gt;

&lt;p&gt;This is the strange idea behind diffusion: first, we destroy the pictures. We add a little random noise, again and again, for 1,000 steps, until only noise is left.&lt;/p&gt;

&lt;p&gt;Each step adds a small amount of noise, &lt;strong&gt;β&lt;/strong&gt;, growing from 0.0001 at step 1 to 0.02 at step 1,000. Multiply all the (1 − β) values together and you get &lt;strong&gt;ᾱ (alpha bar)&lt;/strong&gt;: how much of the original picture is still there.&lt;/p&gt;

&lt;p&gt;The key formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x_t = √ᾱ_t · x₀ + √(1 − ᾱ_t) · ε
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;x₀&lt;/code&gt; is the clean image and &lt;code&gt;ε&lt;/code&gt; is random noise. Squared, the two square roots always add up to one, so the picture fades exactly as fast as the noise grows and the numbers never blow up.&lt;/p&gt;

&lt;p&gt;Real values from my schedule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step 250: about &lt;strong&gt;72%&lt;/strong&gt; of the robot is left&lt;/li&gt;
&lt;li&gt;Step 500: only &lt;strong&gt;28%&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Step 999: √ᾱ is just &lt;strong&gt;0.006&lt;/strong&gt;, so the robot is gone&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The best part is that this formula jumps straight to any step, with no loop. In code it's one function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;                                           &lt;span class="c1"&gt;# 1,000 small noise steps
&lt;/span&gt;&lt;span class="n"&gt;beta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;linspace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1e-4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.02&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;               &lt;span class="c1"&gt;# how much noise each step adds
&lt;/span&gt;&lt;span class="n"&gt;alpha_bar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cumprod&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;beta&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# how much of the image survives after t steps
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add_noise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;eps&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;                         &lt;span class="c1"&gt;# x_t = √ᾱ_t · x0 + √(1 − ᾱ_t) · ε
&lt;/span&gt;    &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;alpha_bar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;x0&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;eps&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are the same settings as the original DDPM paper (Ho et al., 2020).&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The task: guess the noise
&lt;/h2&gt;

&lt;p&gt;We show the model a noisy robot and ask one question: &lt;strong&gt;what noise did I add?&lt;/strong&gt; We know the answer because we added it ourselves, so nobody has to label anything.&lt;/p&gt;

&lt;p&gt;Why guess the noise and not the picture? Noise looks the same statistically at every step, and the DDPM paper found this simpler target works best. Every training image gets a random step, so the model practises on every noise level, from light fog to a full storm.&lt;/p&gt;

&lt;p&gt;The loss is &lt;strong&gt;mean squared error&lt;/strong&gt;: the average of (real noise − guess)².&lt;/p&gt;

&lt;p&gt;A real example: for one robot at step 500, the real noise at a pixel was −1.065 and the trained model guessed −1.14. Over the whole image the error was &lt;strong&gt;0.0028&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If a model can guess the noise, it can remove the noise. And if it can remove noise, it can draw.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The model: a U-Net
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;te&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tmlp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;time_embed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;h1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;d1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;inp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;te&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                               &lt;span class="c1"&gt;# 64×64
&lt;/span&gt;    &lt;span class="n"&gt;h2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;d2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;avg_pool2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;te&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                    &lt;span class="c1"&gt;# 32×32
&lt;/span&gt;    &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;avg_pool2d&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;te&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                    &lt;span class="c1"&gt;# 16×16
&lt;/span&gt;    &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;u2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;scale_factor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;te&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;u1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;scale_factor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;te&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;out&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                                       &lt;span class="c1"&gt;# the predicted noise ε̂
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The U-Net shrinks the image from 64 → 32 → 16 pixels to see the big picture, then grows it back to 64 to fix the details. Shortcut connections carry the fine details across the "U" so nothing gets lost. In code: &lt;code&gt;avg_pool2d&lt;/code&gt; shrinks, &lt;code&gt;interpolate&lt;/code&gt; grows, and &lt;code&gt;torch.cat&lt;/code&gt; glues the shortcut on.&lt;/p&gt;

&lt;p&gt;The basic building block is a &lt;strong&gt;convolution&lt;/strong&gt;: a 3 × 3 window sliding over the image. Each output number is nine weights times the nine pixels under the window, plus a bias. The first convolution turns 3 colour channels into &lt;strong&gt;64 feature maps&lt;/strong&gt;, 64 patterns it can look for, like edges, corners and eyes.&lt;/p&gt;

&lt;p&gt;The model also needs to know &lt;em&gt;how&lt;/em&gt; noisy the picture is, so the step number is turned into a vector of sine and cosine waves and added inside each block. Each block is two convolutions, a normalisation layer, and the SiLU activation.&lt;/p&gt;

&lt;p&gt;Total: &lt;strong&gt;2,142,851 weights&lt;/strong&gt;. Stable Diffusion's U-Net has about 860 million, roughly 400× bigger.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Training, line by line
&lt;/h2&gt;

&lt;p&gt;It's the same four moves as every neural network:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;opt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;optim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;AdamW&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;lr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;2e-4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;STEPS&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;x0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;train&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;train&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,))].&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# 32 real robots
&lt;/span&gt;    &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,),&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                      &lt;span class="c1"&gt;# a random noise level for each
&lt;/span&gt;    &lt;span class="n"&gt;eps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randn_like&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                                   &lt;span class="c1"&gt;# the noise we add (the answer key)
&lt;/span&gt;    &lt;span class="n"&gt;loss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mse_loss&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;add_noise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;eps&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;eps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# how wrong was the guess?
&lt;/span&gt;    &lt;span class="n"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;zero_grad&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;loss&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;backward&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;                                              &lt;span class="c1"&gt;# how should each weight change?
&lt;/span&gt;    &lt;span class="n"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;step&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;                                                   &lt;span class="c1"&gt;# nudge all of them a little
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The idea is gradient descent: &lt;strong&gt;w ← w − η · ∂L/∂w&lt;/strong&gt;, with a learning rate of 0.0002 (the code uses AdamW, a smarter version of the same step).&lt;/p&gt;

&lt;p&gt;10,000 steps took about &lt;strong&gt;35 minutes&lt;/strong&gt; on the Mac GPU, about a fifth of a second per step. The error on the 800 hidden robots fell from &lt;strong&gt;1.1 to about 0.0064&lt;/strong&gt;, and the test loss went down together with the training loss. With 7,200 robots, it was learning, not memorizing.&lt;/p&gt;

&lt;p&gt;Watching the samples (from the same noise every time) was the fun part. At step 1,000 it drew scribbles. At step 3,000 it drew robot parts, all jumbled, including some robots with three eyes. By step 10,000 it drew real robots. It learned the parts before it learned the whole.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Drawing something new from pure noise
&lt;/h2&gt;

&lt;p&gt;To draw, we run the process backwards. Start from pure random noise. Then, 1,000 times: the model guesses the noise, and we remove a little of it.&lt;/p&gt;

&lt;p&gt;Each step moves from &lt;code&gt;t&lt;/code&gt; to &lt;code&gt;t − 1&lt;/code&gt;: mostly the current image, a tiny bit of the model's guess of the clean picture, plus a sprinkle of fresh noise. At step 500 that's 99.4% the current image and only 0.3% the guess. Drawing really is a thousand tiny steps.&lt;/p&gt;

&lt;p&gt;Big shapes appear first (head and body), small details last (eyes, the chest screen). The fresh noise matters: without it, the model gets stuck making the same safe, blurry picture.&lt;/p&gt;

&lt;p&gt;Drawing 16 new robots takes 1,000 passes through the network, about &lt;strong&gt;50 seconds&lt;/strong&gt; on my laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Is it inventing or copying?
&lt;/h2&gt;

&lt;p&gt;I checked. For each new robot, I found the closest image among all 7,200 training robots. The style is similar, but they're not copies: shapes, colours and poses are mixed in new ways.&lt;/p&gt;

&lt;p&gt;Then I trained the same model on only &lt;strong&gt;8 robots&lt;/strong&gt;. With 8 examples it stopped inventing. Every drawing was a remix of the same few robots, sometimes with two heads stuck together. That's overfitting, the image version. Researchers have shown that big image models can sometimes reproduce their training pictures too (Carlini et al., 2023).&lt;/p&gt;

&lt;p&gt;The fix is the same as for text models: more data, more variety, and always test on images the model has never seen.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. The experiment: it trained itself and cheated
&lt;/h2&gt;

&lt;p&gt;Big labs fine-tune image models with a score for "good" pictures. My score sounded innocent: &lt;em&gt;draw cheerful robots&lt;/em&gt;. The reward was how yellow the picture is. Each round, the model drew 48 robots, kept its best 12, and trained on them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Yellow score: &lt;strong&gt;1.1 → 6.3&lt;/strong&gt; in four rounds, almost 6× higher&lt;/li&gt;
&lt;li&gt;Variety of drawings: &lt;strong&gt;79.5 → 39.1&lt;/strong&gt;, cut in half&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It didn't draw cheerful yellow robots. It tinted every picture a muddy yellow-brown and started forgetting how to draw robots at all. That's &lt;strong&gt;reward hacking&lt;/strong&gt;: it maximized the score, not what I wanted.&lt;/p&gt;

&lt;p&gt;Why? The score counts every pixel, and the biggest area in every picture is the background. Tinting the background was the cheapest way to score.&lt;/p&gt;

&lt;p&gt;The fixes: measure more than one thing (like variety), keep the model close to its original the way big labs do, and have a human look at the pictures.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this connects to Stable Diffusion
&lt;/h2&gt;

&lt;p&gt;Real image AI adds two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Text.&lt;/strong&gt; A text model turns your prompt into numbers, and those numbers steer every denoising step. In the formula, the noise guess just gets one more input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A compressed image space.&lt;/strong&gt; Stable Diffusion removes noise from a 64 × 64 latent grid instead of the full 512 × 512 picture, which is much faster.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Beyond that it's the same idea, with an 860-million-weight U-Net trained on over two billion image–text pairs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recap
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A picture is just numbers.&lt;/li&gt;
&lt;li&gt;Diffusion destroys pictures with noise, one step at a time.&lt;/li&gt;
&lt;li&gt;A U-Net learns to guess that noise.&lt;/li&gt;
&lt;li&gt;Removing the noise 1,000 times draws something new.&lt;/li&gt;
&lt;li&gt;The math is small: one noise formula, one mean squared error, one step back, repeated.&lt;/li&gt;
&lt;li&gt;Always check two things: is it copying, and is it cheating the score?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can train this on a normal laptop with your own drawings, or photos of your cat. The full lesson, with every line typed on screen, is on YouTube: &lt;a href="https://youtu.be/19Omz2cwFuY" rel="noopener noreferrer"&gt;https://youtu.be/19Omz2cwFuY&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What should I teach my AI to draw next? Tell me in the comments.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt; Ho, Jain &amp;amp; Abbeel, &lt;em&gt;Denoising Diffusion Probabilistic Models&lt;/em&gt; (2020) · Rombach et al., &lt;em&gt;Latent Diffusion Models&lt;/em&gt; (2022) · Ronneberger et al., &lt;em&gt;U-Net&lt;/em&gt; (2015) · Carlini et al., &lt;em&gt;Extracting Training Data from Diffusion Models&lt;/em&gt; (2023) · Google DeepMind, &lt;em&gt;Specification gaming&lt;/em&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Drafted with AI assistance. The code and numbers come from the recorded run. I make AI, coding and tech tutorials on &lt;a href="https://www.youtube.com/@RainyTechLab" rel="noopener noreferrer"&gt;RainyTech&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>python</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>Teaching a Computer to See: My First Week of Computer Vision</title>
      <dc:creator>Nadia TETA</dc:creator>
      <pubDate>Tue, 13 Oct 2026 13:45:41 +0000</pubDate>
      <link>https://dev.to/nadiateta/teaching-a-computer-to-see-my-first-week-of-computer-vision-368l</link>
      <guid>https://dev.to/nadiateta/teaching-a-computer-to-see-my-first-week-of-computer-vision-368l</guid>
      <description>&lt;p&gt;After weeks of teaching computers to read in NLP, our course moved on to teaching them to see. Here’s what I learned, and what happened when I tested real models on my own photos from Rwanda.&lt;/p&gt;

&lt;h2&gt;
  
  
  A photo is just numbers
&lt;/h2&gt;

&lt;p&gt;A computer doesn’t see people or objects, only numbers. My photo of people painting is 547 × 365 pixels, and each pixel has 3 values (red, green, blue) from 0 to 255: almost 600,000 numbers. One pixel, [226, 168, 43], was mostly red and green, which makes yellow: it was on a yellow shirt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filters find edges
&lt;/h2&gt;

&lt;p&gt;A filter is a small grid of weights that slides over the image, multiplying and adding pixel values. The Sobel filter subtracts the left side from the right, so flat areas give 0 and edges give big numbers. A CNN uses this same idea, but it learns its own filters from data instead of us designing them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing models on my photos
&lt;/h2&gt;

&lt;p&gt;I used three pretrained YOLO models on a painting photo and a photo of agaseke baskets:&lt;/p&gt;

&lt;p&gt;Classification called the painting scene a “marimba” (39.8%), probably because of the wooden easels, and the agaseke a “soap dispenser” (21%).&lt;br&gt;
Detection found 4 people when there were only 3 (one woman got two boxes), and called the baskets “bottles,” since it has no “basket” category.&lt;br&gt;
Segmentation showed objects covering 38% of the image.&lt;/p&gt;

&lt;p&gt;Then I made the photo harder. The model still found 3 people when the photo was very dark, saw a “horse” when it was upside down, and found nothing when it was blurry or low resolution.&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%2Fkcpjtgyr73ohb7gyp5ji.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%2Fkcpjtgyr73ohb7gyp5ji.png" alt=" " width="800" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;The biggest lesson: a model only knows what it was trained on. These models learned mostly from photos taken outside Africa, so they had never seen an agaseke. The fix is local data, used to fine-tune a pretrained model.&lt;/p&gt;

&lt;p&gt;This is already happening across Africa: Nuru spots cassava diseases from leaf photos, Smile ID checks identities from selfies, Open Buildings maps buildings from satellite images, and BLAIVA, built in Kigali, describes the world to people who are blind.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An image is a grid of numbers: height × width × 3.&lt;/li&gt;
&lt;li&gt;Filters find patterns; CNNs learn them.&lt;/li&gt;
&lt;li&gt;Classification, detection and segmentation give more and more detail.&lt;/li&gt;
&lt;li&gt;Models fail on things unlike their training data, so local data matters.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>deeplearning</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>I Showed AI a Crowd of 100+ People. It Found 7</title>
      <dc:creator>Anne Marie Twagirayezu</dc:creator>
      <pubDate>Tue, 13 Oct 2026 13:39:42 +0000</pubDate>
      <link>https://dev.to/anne_marietwagirayezu_17/i-showed-ai-a-crowd-of-100-people-it-found-7-4ahn</link>
      <guid>https://dev.to/anne_marietwagirayezu_17/i-showed-ai-a-crowd-of-100-people-it-found-7-4ahn</guid>
      <description>&lt;p&gt;&lt;em&gt;My first hands-on computer vision experiment, where pixels became predictions, handbags disappeared in the dark, and turning a photo upside down confused AI completely.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You know that feeling when you look at a picture and immediately understand what's happening?&lt;/p&gt;

&lt;p&gt;A crowded street? Easy.&lt;/p&gt;

&lt;p&gt;People crossing the road? Obviously.&lt;/p&gt;

&lt;p&gt;A dog standing next to a bicycle? No problem.&lt;/p&gt;

&lt;p&gt;Now imagine showing the same picture to an AI model and having it confidently suggest that you're looking at a &lt;strong&gt;scoreboard&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Yes. A scoreboard.&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%2F1k16hk35wck8dsuzsert.jpg" 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%2F1k16hk35wck8dsuzsert.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That was one of the first surprises I encountered during the course of computer vision.&lt;/p&gt;

&lt;p&gt;The goal was simple: understand how computers process images, how models recognize objects, and what happens when those models encounter something unexpected.&lt;/p&gt;

&lt;p&gt;But instead of just running the provided examples and calling it a day, I decided to experiment with my own photographs.&lt;/p&gt;

&lt;p&gt;And that's when things got interesting.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Before AI Can See Anything, It Sees Numbers
&lt;/h2&gt;

&lt;p&gt;Let's start with something that sounds obvious but becomes fascinating when you actually experiment with it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A computer doesn't see a photograph the way we do.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I look at my first image, I see a crowded pedestrian crossing, buildings, advertisements, and people going about their day.&lt;/p&gt;

&lt;p&gt;When Python looks at the same image, it sees a NumPy array.&lt;/p&gt;

&lt;p&gt;My photograph had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Width: 1,280 pixels&lt;/li&gt;
&lt;li&gt;Height: 1,920 pixels&lt;/li&gt;
&lt;li&gt;Colour channels: 3 (Red, Green, Blue)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That gives us:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1,280 × 1,920 × 3 = 7,372,800 numbers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;More than seven million numbers representing one photograph!&lt;/p&gt;

&lt;p&gt;Each colour value ranges from 0 to 255.&lt;/p&gt;

&lt;p&gt;For example, one pixel in my image had the RGB values:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[1, 202, 228]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This represents a bright cyan colour because there is almost no red, but plenty of green and blue.&lt;/p&gt;

&lt;p&gt;I used &lt;strong&gt;Pillow and NumPy&lt;/strong&gt; to inspect the image, separate its RGB channels, and explore how the pixels were represented.&lt;/p&gt;

&lt;p&gt;One interesting experiment involved finding the 6 × 6 pixel region with the highest colour variation.&lt;/p&gt;

&lt;p&gt;I expected something like a person's face or the boundary between two objects.&lt;/p&gt;

&lt;p&gt;Instead, the notebook selected a bright cyan sign.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because my calculation measured differences in colour values, not necessarily meaningful objects or edges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson learned:&lt;/strong&gt; What a computer considers interesting depends entirely on what we ask it to measure.&lt;/p&gt;

&lt;p&gt;And that distinction becomes very important in machine learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. I Built My Own Image Filter (Before Letting AI Do the Work)
&lt;/h2&gt;

&lt;p&gt;Next came convolution.&lt;/p&gt;

&lt;p&gt;If you've studied Convolutional Neural Networks (CNNs), you've probably heard about kernels, filters, and feature maps.&lt;/p&gt;

&lt;p&gt;But understanding the theory and implementing it yourself are two different experiences.&lt;/p&gt;

&lt;p&gt;I wrote my own convolution operation using NumPy.&lt;/p&gt;

&lt;p&gt;The idea is surprisingly straightforward.&lt;/p&gt;

&lt;p&gt;Take a small matrix of numbers, slide it across an image, multiply the overlapping values, and add the results.&lt;/p&gt;

&lt;p&gt;Different matrices produce different effects.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blur filters&lt;/strong&gt; smooth out details and reduce sharp variations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sobel filters&lt;/strong&gt; highlight changes in brightness, helping reveal edges.&lt;/p&gt;

&lt;p&gt;When I applied the Sobel filter to my crowded street photograph, the buildings, pedestrian crossing, and outlines of people became more visible.&lt;/p&gt;

&lt;p&gt;It was fascinating to see how much information could be extracted using relatively simple mathematics.&lt;/p&gt;

&lt;p&gt;And then came the connection to deep learning.&lt;/p&gt;

&lt;p&gt;In a traditional image-processing experiment, I decide which filter to use.&lt;/p&gt;

&lt;p&gt;In a CNN, the model learns useful filter weights during training.&lt;/p&gt;

&lt;p&gt;Early layers can learn simple patterns such as edges, while deeper layers combine features into more complex representations.&lt;/p&gt;

&lt;p&gt;So essentially, I was manually experimenting with one of the fundamental ideas behind CNNs.&lt;/p&gt;

&lt;p&gt;Except CNNs don't need me sitting there choosing filters one by one. Thankfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. I Asked AI What Was in My Picture. It Said "Scoreboard."
&lt;/h2&gt;

&lt;p&gt;Now for the fun part.&lt;/p&gt;

&lt;p&gt;I used &lt;strong&gt;YOLO11n-cls&lt;/strong&gt;, a lightweight image classification model, to predict what was in my photograph.&lt;/p&gt;

&lt;p&gt;The model had been trained to classify images into 1,000 ImageNet categories.&lt;/p&gt;

&lt;p&gt;My expectation?&lt;/p&gt;

&lt;p&gt;Something related to people, streets, or cities.&lt;/p&gt;

&lt;p&gt;The actual result?&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prediction&lt;/th&gt;
&lt;th&gt;Confidence&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Scoreboard&lt;/td&gt;
&lt;td&gt;22.6%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Other predictions included street sign, unicycle, cinema, and grocery store.&lt;/p&gt;

&lt;p&gt;I looked at my photograph again.&lt;/p&gt;

&lt;p&gt;A scoreboard? Really?&lt;/p&gt;

&lt;p&gt;But after thinking about it, the result started making sense.&lt;/p&gt;

&lt;p&gt;My photograph contained large signs, advertisements, buildings, and many overlapping objects.&lt;/p&gt;

&lt;p&gt;The classifier had to choose a single label from the categories it knew.&lt;/p&gt;

&lt;p&gt;It wasn't designed to describe an entire busy street scene.&lt;/p&gt;

&lt;p&gt;And importantly, &lt;strong&gt;22.6% confidence is not a particularly strong prediction&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The model wasn't really telling me, "I'm absolutely sure this is a scoreboard."&lt;/p&gt;

&lt;p&gt;It was telling me that, among its available categories, scoreboard received the highest score.&lt;/p&gt;

&lt;p&gt;I repeated the experiment with a second photograph containing people, a bicycle, and a dog.&lt;/p&gt;

&lt;p&gt;This time, the model predicted:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Miniskirt — 25.1% confidence.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At this point, I started wondering whether my AI was more interested in fashion than computer vision.&lt;/p&gt;

&lt;p&gt;But the experiment revealed an important limitation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Image classification assigns a label to the whole image. It doesn't tell us everything happening inside it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a complex scene containing multiple objects, that can be a serious limitation.&lt;/p&gt;

&lt;p&gt;Which brought me to the next experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Object Detection: Finally, AI Started Seeing People
&lt;/h2&gt;

&lt;p&gt;Instead of asking the model to give my entire image one label, I switched to &lt;strong&gt;YOLO11n&lt;/strong&gt;, an object detection model.&lt;/p&gt;

&lt;p&gt;Object detection answers two questions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What objects are present, and where are they located?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Unlike classification, detection can return multiple labels and bounding boxes.&lt;/p&gt;

&lt;p&gt;This sounded perfect for my crowded street photograph.&lt;/p&gt;

&lt;p&gt;I ran the model.&lt;/p&gt;

&lt;p&gt;And the result was...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11 objects detected.&lt;/strong&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%2Fvkccr7zzpcjzjvb925z1.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%2Fvkccr7zzpcjzjvb925z1.png" alt=" " width="800" height="886"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Specifically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;7 people&lt;/li&gt;
&lt;li&gt;4 handbags&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now here's the problem.&lt;/p&gt;

&lt;p&gt;My photograph contained well over 100 people.&lt;/p&gt;

&lt;p&gt;The model found seven.&lt;/p&gt;

&lt;p&gt;SEVEN.&lt;/p&gt;

&lt;p&gt;Imagine using that system to count attendance at a crowded event.&lt;/p&gt;

&lt;p&gt;The organizers would probably think nobody showed up!&lt;/p&gt;

&lt;p&gt;But the model's behaviour revealed something important.&lt;/p&gt;

&lt;p&gt;It was much better at detecting larger people near the camera than people farther away.&lt;/p&gt;

&lt;p&gt;The distant pedestrians were small, densely packed, and often partially hidden behind one another.&lt;/p&gt;

&lt;p&gt;The model also resized the image for inference, reducing the detail available for detecting tiny objects.&lt;/p&gt;

&lt;p&gt;And because I used a confidence threshold of 40%, less certain predictions were filtered out.&lt;/p&gt;

&lt;p&gt;This wasn't necessarily a case of the model being completely useless.&lt;/p&gt;

&lt;p&gt;It was a case of &lt;strong&gt;using a lightweight general-purpose detector on a scene that is particularly challenging for object detection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To investigate further, I tested my second photograph.&lt;/p&gt;

&lt;p&gt;This one had fewer objects and a less crowded environment.&lt;/p&gt;

&lt;p&gt;The model detected:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4 people, 1 bicycle, and 1 dog.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All six detections matched objects in the photograph.&lt;/p&gt;

&lt;p&gt;Even the small dog and the bicycle partially hidden behind a person were identified.&lt;/p&gt;

&lt;p&gt;Same model. Different image. Very different results.&lt;/p&gt;

&lt;p&gt;That was probably one of my biggest takeaways from the entire exercise:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A model performing well on one image doesn't mean it will perform equally well on every image.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The environment, object size, visibility, and image quality all matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Segmentation: Going Beyond Bounding Boxes
&lt;/h2&gt;

&lt;p&gt;Object detection was interesting, but I wanted to understand how computers could identify the actual shape of an object.&lt;/p&gt;

&lt;p&gt;That's where segmentation comes in.&lt;/p&gt;

&lt;p&gt;I used &lt;strong&gt;YOLO11n-seg&lt;/strong&gt;, which predicts pixel-level masks for detected objects.&lt;/p&gt;

&lt;p&gt;Instead of simply drawing a rectangle around a person, the model identifies the pixels belonging to that person's visible shape.&lt;/p&gt;

&lt;p&gt;In my crowded photograph, I used these masks to estimate how much of the image was occupied by detected people.&lt;/p&gt;

&lt;p&gt;The result was approximately &lt;strong&gt;13% of the image&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;One detail I found particularly interesting was how simple the calculation could be.&lt;/p&gt;

&lt;p&gt;A binary mask contains values of 0 and 1.&lt;/p&gt;

&lt;p&gt;Zero means the pixel is not part of the object.&lt;/p&gt;

&lt;p&gt;One means it is.&lt;/p&gt;

&lt;p&gt;By calculating the mean of a binary mask, we can determine the proportion of pixels covered by that mask.&lt;/p&gt;

&lt;p&gt;Of course, for multiple people, overlapping masks must be handled carefully to avoid counting the same pixels more than once.&lt;/p&gt;

&lt;p&gt;What made this experiment exciting was realizing how the same concept can be useful in completely different industries.&lt;/p&gt;

&lt;p&gt;In agriculture, segmentation can help estimate crop coverage.&lt;/p&gt;

&lt;p&gt;In healthcare, it can help measure regions of interest in medical images.&lt;/p&gt;

&lt;p&gt;In satellite imagery, it can help identify buildings, roads, and land-cover areas.&lt;/p&gt;

&lt;p&gt;The mathematics may look simple, but the applications are powerful.&lt;/p&gt;

&lt;p&gt;There was still one limitation, though.&lt;/p&gt;

&lt;p&gt;Just like the detector, the segmentation model mostly identified larger people near the camera.&lt;/p&gt;

&lt;p&gt;It couldn't magically recover people the underlying model had failed to detect.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Then I Decided to Make the Model's Life Difficult
&lt;/h2&gt;

&lt;p&gt;After seeing the models work on normal photographs, I had another question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens when the image conditions are no longer ideal?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because real-world photographs are rarely perfect.&lt;/p&gt;

&lt;p&gt;People take pictures at night.&lt;/p&gt;

&lt;p&gt;Phones have different camera qualities.&lt;/p&gt;

&lt;p&gt;Images get compressed.&lt;/p&gt;

&lt;p&gt;And sometimes a camera captures something from a very unusual angle.&lt;/p&gt;

&lt;p&gt;So I created three modified versions of my crowded street photograph:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A very dark version at 15% brightness.&lt;/li&gt;
&lt;li&gt;An upside-down version.&lt;/li&gt;
&lt;li&gt;A very low-resolution version, reduced to 48 pixels wide.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then I ran the same object detector on each version.&lt;/p&gt;

&lt;p&gt;Here is what happened:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Image condition&lt;/th&gt;
&lt;th&gt;Total objects&lt;/th&gt;
&lt;th&gt;People detected&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Original&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Very dark&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Upside down&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Low resolution&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Let's talk about these results.&lt;/p&gt;

&lt;h3&gt;
  
  
  Experiment A: Darkness made the handbags disappear
&lt;/h3&gt;

&lt;p&gt;When I reduced the brightness to 15%, the model still detected seven people.&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%2F23m30he18geytkscpl8e.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%2F23m30he18geytkscpl8e.png" alt=" " width="242" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But the four handbags?&lt;/p&gt;

&lt;p&gt;Gone.&lt;/p&gt;

&lt;p&gt;Apparently, the people survived the darkness, but their accessories didn't.&lt;/p&gt;

&lt;p&gt;A possible explanation is that the handbags had less visible detail and were harder to distinguish from their surroundings.&lt;/p&gt;

&lt;p&gt;The larger people remained recognizable enough for the detector.&lt;/p&gt;

&lt;p&gt;This demonstrated that different object categories and sizes can respond differently to poor lighting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Experiment B: Turning the image upside down broke everything
&lt;/h3&gt;

&lt;p&gt;Next, I rotated the photograph by 180 degrees.&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%2Frq8ju4djox23yk8k48bc.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%2Frq8ju4djox23yk8k48bc.png" alt=" " width="252" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The model detected:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero objects.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not one person.&lt;/p&gt;

&lt;p&gt;Not one handbag.&lt;/p&gt;

&lt;p&gt;Nothing.&lt;/p&gt;

&lt;p&gt;Meanwhile, I could still recognize that the photograph showed a crowded street.&lt;/p&gt;

&lt;p&gt;This was a useful reminder that AI models don't automatically possess the same visual understanding or robustness as humans.&lt;/p&gt;

&lt;p&gt;The detector had likely learned many patterns from photographs in more typical orientations.&lt;/p&gt;

&lt;p&gt;Turning the entire scene upside down changed the appearance and spatial arrangement of those patterns.&lt;/p&gt;

&lt;p&gt;The model struggled to generalize.&lt;/p&gt;

&lt;h3&gt;
  
  
  Experiment C: Low resolution finished the job
&lt;/h3&gt;

&lt;p&gt;Finally, I reduced the image to just 48 pixels wide.&lt;/p&gt;

&lt;p&gt;Again:&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%2Fc2g6ovu9ybd1qgjphd5e.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%2Fc2g6ovu9ybd1qgjphd5e.png" alt=" " width="238" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero detections.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At such a small resolution, individual people lost most of their distinguishing features.&lt;/p&gt;

&lt;p&gt;When the image was enlarged again, the missing details didn't magically return.&lt;/p&gt;

&lt;p&gt;The model was left trying to identify objects from heavily degraded visual information.&lt;/p&gt;

&lt;p&gt;And it failed.&lt;/p&gt;

&lt;p&gt;These experiments showed me why testing AI under different conditions is so important.&lt;/p&gt;

&lt;p&gt;A model can perform reasonably well during a demonstration and still struggle when deployed in a real environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. What This Experiment Changed About How I Think About AI
&lt;/h2&gt;

&lt;p&gt;Before this exercise, it was easy to think about computer vision as a model that takes an image and tells us what's inside it.&lt;/p&gt;

&lt;p&gt;But working through the process from pixels to predictions made me appreciate how many decisions and limitations exist along the way.&lt;/p&gt;

&lt;p&gt;Here are five things I'm taking away from this experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, images are data before they are meaning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Everything starts with numbers. How we transform and represent those numbers determines what patterns become available to a model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second, different computer vision tasks solve different problems.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Classification answers what an image might represent.&lt;/p&gt;

&lt;p&gt;Detection identifies objects and their locations.&lt;/p&gt;

&lt;p&gt;Segmentation identifies the pixels belonging to objects.&lt;/p&gt;

&lt;p&gt;Choosing the right approach matters just as much as choosing the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third, small objects and crowded scenes are difficult.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My detector finding seven people in a crowd of more than 100 was a practical demonstration of why object size, occlusion, and image resolution matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fourth, model predictions need to be questioned.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A prediction is not automatically correct because it came from a trained model.&lt;/p&gt;

&lt;p&gt;Confidence scores, missing detections, and unexpected outputs all deserve investigation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finally, real-world testing matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a computer vision application is going to be used on nighttime photographs, low-quality phone images, or crowded environments, it needs to be evaluated under those conditions.&lt;/p&gt;

&lt;p&gt;Otherwise, we risk building systems that look impressive in a notebook but fail when people actually need them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts: AI Can See, But Does It Understand?
&lt;/h2&gt;

&lt;p&gt;My first day exploring computer vision started with a simple question:&lt;/p&gt;

&lt;p&gt;How does a computer turn pixels into predictions?&lt;/p&gt;

&lt;p&gt;By the end, I had implemented convolution filters, experimented with image classification, detected objects, explored segmentation, and tested how models behave under difficult conditions.&lt;/p&gt;

&lt;p&gt;I also discovered that an AI model could mistake a crowded street for a scoreboard, overlook most of a crowd, and completely lose its ability to detect people when an image was flipped upside down.&lt;/p&gt;

&lt;p&gt;And strangely enough, those failures were the most valuable part of the experience.&lt;/p&gt;

&lt;p&gt;Because learning AI isn't just about getting models to produce predictions.&lt;/p&gt;

&lt;p&gt;It's about understanding &lt;strong&gt;why they make those predictions, when we can trust them, and what happens when the real world doesn't look like the training data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was Day 1 of my computer vision journey and I'm looking forward to exploring what comes next.&lt;/p&gt;

&lt;p&gt;Hopefully, the next model will be better at counting people.&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>deeplearning</category>
      <category>computervision</category>
    </item>
    <item>
      <title>From Pixels to Meaning: A Beginner's First Day in Computer Vision</title>
      <dc:creator>Igihozo Gwiza Aline</dc:creator>
      <pubDate>Tue, 13 Oct 2026 13:09:48 +0000</pubDate>
      <link>https://dev.to/igihozo_gwizaaline_e6790/from-pixels-to-meaning-a-beginners-first-day-in-computer-vision-eni</link>
      <guid>https://dev.to/igihozo_gwizaaline_e6790/from-pixels-to-meaning-a-beginners-first-day-in-computer-vision-eni</guid>
      <description>&lt;p&gt;Before the first day of computer vision, I thought it meant "teaching a computer to look at pictures, the way we do." By the end of the day I realised that sentence hides about six different questions. These are the ones I wrote down, with the answers that finally made sense to me.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Why is "seeing" hard for a computer?
&lt;/h2&gt;

&lt;p&gt;Because a computer doesn't receive a picture. It receives numbers.&lt;/p&gt;

&lt;p&gt;A photo is a grid of pixels, and each pixel is three numbers: how much red, green and blue light it has, each from 0 to 255. Our sample street photo is 1080 rows by 810 columns, so that is 1080 x 810 x 3 = &lt;strong&gt;2,624,400 numbers&lt;/strong&gt;. Somewhere in those numbers is a bus, but nothing in the file says "bus".&lt;/p&gt;

&lt;p&gt;Think of it like being handed a spreadsheet of 2.6 million cells and being asked what it shows. Computer vision is the work of getting from the spreadsheet to the meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. What can computer vision actually do?
&lt;/h2&gt;

&lt;p&gt;I found it easier to remember the field as five jobs, from simplest to most detailed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Classification:&lt;/strong&gt; one label for the whole picture ("minibus").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detection:&lt;/strong&gt; a box around each object ("1 bus, 4 people").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Segmentation:&lt;/strong&gt; a label for every single pixel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OCR:&lt;/strong&gt; reading text inside an image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tracking:&lt;/strong&gt; following an object from frame to frame in a video.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same street photo can feed the first three, and each gives a different kind of answer. Choosing the right job matters. If you want to count motorcycles at a junction, a single label for the whole photo will not help you. You need detection.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. How does a computer find an edge?
&lt;/h2&gt;

&lt;p&gt;An edge is just a place where brightness changes quickly. To find one, the computer slides a small grid of weights, called a filter, across the image, multiplying and adding as it goes.&lt;/p&gt;

&lt;p&gt;You can see the whole idea in a few lines of NumPy, with no model and no download. Here is a tiny 6x6 "image" that is dark on the left and bright on the right:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;sobel_x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
                    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
                    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]])&lt;/span&gt;

&lt;span class="n"&gt;flat_patch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="c1"&gt;# all zeros: no change in brightness
&lt;/span&gt;&lt;span class="n"&gt;edge_patch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="c1"&gt;# dark -&amp;gt; bright: an edge
&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;flat_patch&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sobel_x&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;   &lt;span class="c1"&gt;# 0
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;edge_patch&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sobel_x&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;   &lt;span class="c1"&gt;# 800
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where nothing changes, the answer is &lt;strong&gt;0&lt;/strong&gt;. Where the brightness jumps from left to right, the answer is &lt;strong&gt;800&lt;/strong&gt;. That big number is the computer's way of saying "something is happening here". Run the same filter over the whole photo and every edge lights up.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. So what does a CNN add?
&lt;/h2&gt;

&lt;p&gt;In that example I chose the weights. A Convolutional Neural Network (CNN) uses the same sliding-filter idea, but it &lt;strong&gt;learns the weights by itself&lt;/strong&gt; from thousands of labelled images.&lt;/p&gt;

&lt;p&gt;Early layers end up finding edges. Middle layers combine edges into textures and shapes. Later layers combine those into whole objects. I found this the most surprising part of the day: nobody tells the network what an edge is. It works that out because edges turn out to be useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. How can a detector find objects so quickly?
&lt;/h2&gt;

&lt;p&gt;Older detectors worked in two steps: first propose regions that might hold an object, then classify each region. That was accurate, but slow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;YOLO&lt;/strong&gt; ("You Only Look Once") does it in one pass. The whole image goes through the network once, and out come every box, label and confidence score together. It is fast enough for live video, and the small version we used is only about 5 MB.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;ultralytics&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;YOLO&lt;/span&gt;

&lt;span class="n"&gt;detector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;YOLO&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;yolo11n.pt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;detector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bus.jpg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;verbose&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;boxes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the sample photo it finds the bus (94% sure) and the people standing in front of it. The &lt;code&gt;conf&lt;/code&gt; value is a setting you choose, and it changes the result: lower it and you get more boxes with more mistakes, raise it and you get fewer but surer ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Does it work everywhere? What can go wrong?
&lt;/h2&gt;

&lt;p&gt;This was the question that stayed with me, because the answer is: not automatically.&lt;/p&gt;

&lt;p&gt;We made the same photo harder on purpose. In the dark, the model invented a skateboard. Upside down, it missed the bus. At very low resolution, it found nothing. The pixels were the same photo, but the conditions were different from what the model was trained on.&lt;/p&gt;

&lt;p&gt;That matters here, because many of these models were trained mostly on photos from other parts of the world. And yet computer vision is already being used in Africa:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nuru&lt;/strong&gt; helps farmers diagnose cassava disease from a leaf photo, offline, on a basic phone.&lt;/li&gt;
&lt;li&gt;In Nigeria, X-ray screening software helped find TB: 5,298 people were screened, and 85 with TB were found.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BLAIVA&lt;/strong&gt;, built by FabLab Rwanda in Kigali, is a wearable camera that describes objects, text and faces for people with low vision.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For each of these, the useful question is not "does it work?" but "what happens to the person if it fails?" A wrong answer on a leaf photo and a wrong answer on an X-ray are not the same kind of mistake.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take away
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A photo is height x width x 3 numbers.&lt;/li&gt;
&lt;li&gt;Filters find patterns, and CNNs learn their own filters.&lt;/li&gt;
&lt;li&gt;Classification, detection and segmentation answer different questions.&lt;/li&gt;
&lt;li&gt;A model is only as good as the data it has seen, so local data matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next I want to learn how datasets are built, how to train my own small CNN in PyTorch, and how to test a model honestly. If you have tried a computer vision model on your own photos, I would love to hear what it got right and what it got wrong.&lt;/p&gt;

</description>
      <category>computervision</category>
      <category>python</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>Computer Vision: Learning How Computers See image</title>
      <dc:creator>iradukunda annet</dc:creator>
      <pubDate>Tue, 13 Oct 2026 12:34:36 +0000</pubDate>
      <link>https://dev.to/annetorah/computer-vision-learning-how-computers-see-image-4jgn</link>
      <guid>https://dev.to/annetorah/computer-vision-learning-how-computers-see-image-4jgn</guid>
      <description>&lt;p&gt;When I started learning Computer Vision, I thought it was just about teaching computers to recognize pictures. But honestly, I discovered that there is so much more behind it!  Through my lessons and practical notebook, I started understanding how computers process images and how we can use Python to help them recognize different things.&lt;/p&gt;

&lt;p&gt;what i have got from this is;&lt;/p&gt;

&lt;p&gt;first, I learned that computers see images as numbers called pixels. Every pixel contains information about brightness or colour. I also learned about RGB colour channels and how a colour image can be represented as three grids of numbers: red, green, and blue. This helped me understand that computers don't see images exactly like humans do.&lt;/p&gt;

&lt;p&gt;One of the topics I found interesting was image filters and convolution. I learned that filters use small grids of numbers called kernels to process images. For example, a blur filter smooths an image, while the Sobel filter helps detect edges by finding changes in brightness.&lt;/p&gt;

&lt;p&gt;Here is one of the filter examples I learned:&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%2F225pl53l0ag40oof2qs8.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%2F225pl53l0ag40oof2qs8.png" alt=" " width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;import numpy as np&lt;/p&gt;

&lt;p&gt;blur = np.ones((5, 5)) / 25&lt;/p&gt;

&lt;p&gt;sobel_x = np.array([&lt;br&gt;
    [-1, 0, 1],&lt;br&gt;
    [-2, 0, 2],&lt;br&gt;
    [-1, 0, 1]&lt;br&gt;
])&lt;/p&gt;

&lt;p&gt;sobel_y = sobel_x.T&lt;/p&gt;

&lt;p&gt;The blur kernel averages nearby pixels to smooth the image. sobel_x helps detect vertical boundaries, while sobel_y helps detect horizontal boundaries. At first, these numbers looked confusing, but understanding what each filter does made the concept easier for me. 🥹&lt;/p&gt;

&lt;p&gt;I also learned about Convolutional Neural Networks (CNNs). Unlike filters that we design ourselves, CNNs can learn their own filters from training images. They can learn simple features such as edges and colours, then combine them into more complex features like textures, object parts, and complete objects.&lt;/p&gt;

&lt;p&gt;Understanding Different Computer Vision Tasks&lt;/p&gt;

&lt;p&gt;Through the PPT and notebook, I learned that Computer Vision has different tasks:&lt;/p&gt;

&lt;p&gt;Image classification: Predicts what an image contains, usually by giving it one main label.&lt;/p&gt;

&lt;p&gt;Object detection: Identifies objects and shows where they are using bounding boxes.&lt;/p&gt;

&lt;p&gt;Image segmentation: Identifies which pixels belong to different objects or regions.&lt;/p&gt;

&lt;p&gt;OCR: Helps computers read text inside images.&lt;/p&gt;

&lt;p&gt;Object tracking: Follows objects across video frames.&lt;/p&gt;

&lt;p&gt;I also practised working with pretrained YOLO models in the notebook. I learned that YOLO means You Only Look Once. It detects objects in one main pass through an image, making it useful for fast predictions. We also explored how pretrained models can classify images, detect objects, and perform segmentation without building a model completely from scratch.&lt;/p&gt;

&lt;p&gt;Another concept I learned was Vision Transformers (ViTs). They divide an image into smaller patches and process them like tokens in a language model. I found this interesting because it connects Computer Vision to the Transformer concepts I learned in NLP.&lt;/p&gt;

&lt;p&gt;What Surprised Me Most&lt;/p&gt;

&lt;p&gt;I learned that AI models are not always correct. In our lesson, we explored how changes such as dark lighting, turning an image upside down, or reducing its resolution can affect predictions. A model might miss an object or recognize something incorrectly because it has not learned enough from similar examples.&lt;/p&gt;

&lt;p&gt;This taught me why good training data matters, why models need proper testing, and why using images that represent our own environment is important. I also discovered how Computer Vision can help in African communities, from identifying crop diseases to supporting healthcare and accessibility.&lt;/p&gt;

&lt;p&gt;My Final Thoughts &lt;/p&gt;

&lt;p&gt;Honestly, I am still learning, and some concepts were confusing at first. But this journey has helped me understand that Computer Vision is more than just making computers recognize pictures. It involves pixels, filters, mathematics, neural networks, and learning from data.&lt;/p&gt;

&lt;p&gt;This is just the beginning of my Computer Vision journey, and I can't wait to use what I have learned to build something meaningful! &lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>python</category>
    </item>
    <item>
      <title>Activation Functions in Neural Networks: Sigmoid, Tanh, ReLU, GELU</title>
      <dc:creator>Anish Rane</dc:creator>
      <pubDate>Tue, 13 Oct 2026 03:45:00 +0000</pubDate>
      <link>https://dev.to/mlaiinsightshub/activation-functions-in-neural-networks-sigmoid-tanh-relu-gelu-1ngm</link>
      <guid>https://dev.to/mlaiinsightshub/activation-functions-in-neural-networks-sigmoid-tanh-relu-gelu-1ngm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Why neural networks need activation functions. Sigmoid, tanh, ReLU, GELU and softmax in plain English, with a comparison table and a rule for choosing one.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Here is a strange fact: you could stack 100 layers of a neural network and it would be exactly as powerful as a single layer.&lt;/strong&gt; Sounds like a scam, right? It would be, if it weren’t for one tiny ingredient called the &lt;em&gt;activation function&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If you have ever opened a deep learning tutorial and seen words like ReLU, sigmoid or softmax fly by, this post is for you. No heavy maths, no fear. By the end you will know what activation functions do, why they exist, and which one to pick without googling in a panic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an activation function, really?
&lt;/h2&gt;

&lt;p&gt;Every artificial neuron does two jobs. First it takes its inputs, multiplies each by a weight and adds them up. Second, it passes that total through a small function that decides how strongly the neuron should "fire". That second step is the activation function.&lt;/p&gt;

&lt;p&gt;Think of a bouncer at a club. The neuron’s total is the crowd noise outside. The bouncer (activation function) decides: too quiet, stay out; loud enough, come in; ridiculously loud, still only one person gets in at a time. Different bouncers, different rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why can’t we skip it? The 100-layer trick
&lt;/h2&gt;

&lt;p&gt;Multiplying and adding is called a &lt;em&gt;linear&lt;/em&gt; operation. The awkward thing about linear operations is that combining them gives you… another linear operation. Two straight-line rules stacked together are still just one straight-line rule. So a network with no activation functions, however deep, can only draw straight lines through your data.&lt;/p&gt;

&lt;p&gt;Real problems are not straight. Recognising a cat, translating Hindi to English or predicting engine wear all involve curves and twists. The activation function adds a bend at every layer, and those bends stacked together let the network trace almost any shape. That is the whole secret.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Layers give a network depth. Activation functions give it the ability to use that depth.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The main characters
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Sigmoid: the classic that got old
&lt;/h3&gt;

&lt;p&gt;Sigmoid squashes any number into a value between 0 and 1, which makes it look like a probability. Big positive input gives nearly 1, big negative gives nearly 0. It was the star of early neural networks because it loosely mimics a biological neuron that is either firing or quiet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The catch:&lt;/strong&gt; at the far ends the curve goes almost flat. Flat means the slope is nearly zero, and networks learn by following slopes. Even at its steepest, sigmoid’s slope is only 0.25. Multiply a number like that through many layers and the learning signal shrinks to almost nothing. This is the famous &lt;em&gt;vanishing gradient&lt;/em&gt; problem. Early layers basically stop learning, like a game of telephone where the message fades before it reaches the first person.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where it still shines:&lt;/strong&gt; the final layer of a &lt;a href="https://mlaiinsightshub.blog/how-logistic-regression-works-guide/" rel="noopener noreferrer"&gt;yes/no prediction&lt;/a&gt; (spam or not spam).&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Tanh: sigmoid’s more balanced sibling
&lt;/h3&gt;

&lt;p&gt;Tanh (say "tanch") squashes numbers between -1 and 1. Because its output is centred around zero, learning is usually smoother than with sigmoid. It still flattens at the ends, so it shares the vanishing gradient headache, just a little less. You will still meet it inside older recurrent networks such as LSTMs.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. ReLU: the boring one that changed everything
&lt;/h3&gt;

&lt;p&gt;ReLU stands for Rectified Linear Unit, which is a very grand name for a very simple rule: &lt;strong&gt;if the number is negative, output 0; otherwise pass it through unchanged.&lt;/strong&gt; That’s it. In code it is literally &lt;code&gt;max(0, x)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Why did such a plain rule take over deep learning? Two reasons. It is extremely cheap to compute (just a comparison, no exponentials). And for positive inputs its slope is exactly 1, so the learning signal does not fade as it travels back through layers. ReLU became the default after it powered the AlexNet image model that won the 2012 ImageNet competition and kicked off the modern deep learning boom.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The catch:&lt;/strong&gt; a neuron that keeps receiving negative inputs outputs zero forever, and with zero slope it can never recover. People call this a "dead" neuron, or the dying ReLU problem. Poor thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Leaky ReLU: giving the dead a pulse
&lt;/h3&gt;

&lt;p&gt;Leaky ReLU fixes the dead neuron issue with a small tweak: instead of outputting exactly 0 for negatives, it lets a tiny amount through (often 1% of the input). The neuron always has some slope, so it can always recover.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. GELU and Swish: the smooth modern ones
&lt;/h3&gt;

&lt;p&gt;ReLU has a sharp corner at zero. GELU and Swish (also called SiLU) round that corner off into a gentle curve, which often trains a little better in very large models. GELU is used in well-known &lt;a href="https://mlaiinsightshub.blog/fine-tuning-llms-complete-guide/" rel="noopener noreferrer"&gt;language models&lt;/a&gt; such as BERT and the GPT family. A fun bit of trivia: Swish was discovered by researchers using an automated search that tried many candidate functions, rather than by someone sitting down and deriving it.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Softmax: the vote counter
&lt;/h3&gt;

&lt;p&gt;Softmax is different. Instead of treating one neuron at a time, it looks at a whole group of outputs and turns them into percentages that add up to 100%. If a model is deciding between cat, dog and bird, softmax might output 85%, 10% and 5%. It belongs in the &lt;em&gt;last&lt;/em&gt; layer of a multi-class classifier, never in the middle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Output range&lt;/th&gt;
&lt;th&gt;Best used for&lt;/th&gt;
&lt;th&gt;Watch out for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sigmoid&lt;/td&gt;
&lt;td&gt;0 to 1&lt;/td&gt;
&lt;td&gt;Final layer, yes/no output&lt;/td&gt;
&lt;td&gt;Vanishing gradients&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tanh&lt;/td&gt;
&lt;td&gt;-1 to 1&lt;/td&gt;
&lt;td&gt;Older recurrent networks&lt;/td&gt;
&lt;td&gt;Vanishing gradients&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReLU&lt;/td&gt;
&lt;td&gt;0 to infinity&lt;/td&gt;
&lt;td&gt;Hidden layers, default choice&lt;/td&gt;
&lt;td&gt;Dead neurons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Leaky ReLU&lt;/td&gt;
&lt;td&gt;Slightly below 0 to infinity&lt;/td&gt;
&lt;td&gt;When ReLU neurons die&lt;/td&gt;
&lt;td&gt;One extra setting to pick&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GELU / Swish&lt;/td&gt;
&lt;td&gt;Smooth, mostly positive&lt;/td&gt;
&lt;td&gt;Transformers, large models&lt;/td&gt;
&lt;td&gt;Slightly more compute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Softmax&lt;/td&gt;
&lt;td&gt;0 to 1, sums to 1&lt;/td&gt;
&lt;td&gt;Final layer, many classes&lt;/td&gt;
&lt;td&gt;Not for hidden layers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  So which one should you pick?
&lt;/h2&gt;

&lt;p&gt;A beginner-safe recipe that works for a surprising number of projects:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hidden layers:&lt;/strong&gt; start with ReLU. If many neurons seem dead, try Leaky ReLU.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output for yes/no:&lt;/strong&gt; sigmoid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output for many categories:&lt;/strong&gt; softmax.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output for a number&lt;/strong&gt; (like predicting a temperature): no activation at all, just the raw value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Building a transformer:&lt;/strong&gt; follow what similar models use, usually GELU or a Swish-style function.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it yourself in 30 seconds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="n"&gt;sigmoid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;relu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;maximum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;tanh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tanh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sigmoid:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sigmoid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tanh :&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tanh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;relu :&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;relu&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it and compare. Notice how sigmoid barely changes between 3 and 100, while ReLU keeps growing. That difference is exactly why one struggles with depth and the other doesn’t.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can I use different activation functions in different layers?
&lt;/h3&gt;

&lt;p&gt;Yes. Hidden layers commonly use one function (like ReLU) while the output layer uses another (like softmax) to match the task.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is ReLU always the best?
&lt;/h3&gt;

&lt;p&gt;No. It is the best &lt;em&gt;starting point&lt;/em&gt;. Newer smooth functions can edge it out in very large models, but for most beginner projects ReLU is fast, simple and hard to beat.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a vanishing gradient in one sentence?
&lt;/h3&gt;

&lt;p&gt;It is when the learning signal shrinks as it travels backwards through the layers until the early layers get almost no feedback and stop improving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thought
&lt;/h2&gt;

&lt;p&gt;An activation function is a tiny bend that turns a pile of straight-line maths into something that can recognise faces, translate languages and predict failures. Small switch, huge effect. Which one surprised you most: the 100-layer trick or the fact that ReLU is just &lt;code&gt;max(0, x)&lt;/code&gt;? Tell me in the comments, and if you want a follow-up on how neural networks actually learn (backpropagation without tears), say so.&lt;/p&gt;

&lt;p&gt;Related guides you may like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mlaiinsightshub.blog/how-logistic-regression-works-guide/" rel="noopener noreferrer"&gt;How Logistic Regression Works: Beginner to Pro Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mlaiinsightshub.blog/fine-tuning-llms-complete-guide/" rel="noopener noreferrer"&gt;Complete Guide to Fine-Tuning LLMs: From Prompt-Tuning to RLHF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mlaiinsightshub.blog/linear-regression-beginners-guide/" rel="noopener noreferrer"&gt;Linear Regression Explained: A Beginner’s Guide to Prediction&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💬 Over to you
&lt;/h2&gt;

&lt;p&gt;Which activation function do you reach for by default, and has switching ever fixed a model that wasn't learning? I'd love to hear your war stories.&lt;/p&gt;

&lt;p&gt;If this helped, &lt;strong&gt;hit ❤️ and follow&lt;/strong&gt; for more plain-English ML and engineering guides. New posts go out every Tuesday and Friday, and this one is part of the &lt;strong&gt;Machine Learning Basics&lt;/strong&gt; series.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://mlaiinsightshub.blog/activation-functions-explained-for-beginners/" rel="noopener noreferrer"&gt;ML AI Insights Hub&lt;/a&gt;. Find more plain-English ML guides, worked engineering examples and free Python/Excel calculators at &lt;a href="https://mlaiinsightshub.blog" rel="noopener noreferrer"&gt;mlaiinsightshub.blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
    <item>
      <title>DINO-EdgeQuery: Learning Building Edges and Their Connections for GIS-Ready Polygons</title>
      <dc:creator>Yuji Kobayashi</dc:creator>
      <pubDate>Tue, 13 Oct 2026 01:11:50 +0000</pubDate>
      <link>https://dev.to/lehua555/dino-edgequery-learning-building-edges-and-their-connections-for-gis-ready-polygons-4ai6</link>
      <guid>https://dev.to/lehua555/dino-edgequery-learning-building-edges-and-their-connections-for-gis-ready-polygons-4ai6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When extracting buildings from satellite or aerial imagery, predicting building regions through segmentation still leaves another task: converting those regions into building polygons that are practical to use in GIS.&lt;/p&gt;

&lt;p&gt;Directly vectorizing mask contours can produce jagged boundaries and unnecessary vertices. Aggressive simplification, however, can remove important corners and small geometric details. Recognizing building regions accurately and producing geometry suitable for editing and inspection are two problems that need to be addressed separately.&lt;/p&gt;

&lt;p&gt;To address this, we developed &lt;strong&gt;DINO-EdgeQuery, which learns the edges that form a building and the connections between them&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The model predicts candidate edges from the image features of each building and learns which edge follows which. The final vertices are computed as intersections of the supporting lines of the ordered edges.&lt;/p&gt;

&lt;p&gt;This article introduces the architecture, training procedure, and evaluation results based on our paper and presentation at the Academic Track of FOSS4G Hiroshima 2026. The paper is available in the &lt;a href="https://isprs-archives.copernicus.org/articles/L-4-W1-2026/119/2026/" rel="noopener noreferrer"&gt;ISPRS Archives&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Although the intended application is building extraction from high-resolution satellite imagery, &lt;strong&gt;the training and quantitative evaluation reported here use aerial imagery from the WHU Building Dataset&lt;/strong&gt;. These results do not demonstrate equivalent performance on satellite imagery.&lt;/p&gt;

&lt;p&gt;This article provides a concise overview of the paper accepted for the FOSS4G Hiroshima 2026 Academic Track and the presentation delivered at the conference.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Why Predict Edges?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Mask Accuracy and Polygon Quality
&lt;/h3&gt;

&lt;p&gt;A common building extraction workflow consists of building mask prediction, contour tracing, and polygon simplification. This approach can combine existing segmentation models with GIS processing, but errors in mask boundaries affect the final geometry.&lt;/p&gt;

&lt;p&gt;Building polygons used in GIS need more than good region overlap. They should also meet requirements such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Representing straight boundaries with few vertices&lt;/li&gt;
&lt;li&gt;Placing building corners appropriately&lt;/li&gt;
&lt;li&gt;Avoiding self-intersections and degenerate geometry&lt;/li&gt;
&lt;li&gt;Avoiding duplicate outputs for the same building&lt;/li&gt;
&lt;li&gt;Carrying geographic coordinates so they can be inspected and edited in GIS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many building outlines consist of long straight segments and a relatively small number of corners. DINO-EdgeQuery reflects this property by using &lt;strong&gt;edges as the primary prediction unit&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Positioning Among Existing Approaches
&lt;/h3&gt;

&lt;p&gt;The related work discussed in the paper can be organized by its primary representation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Main representation or idea&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Mask contour tracing and simplification&lt;/td&gt;
&lt;td&gt;Construct polygons from predicted raster boundaries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frame Field Learning&lt;/td&gt;
&lt;td&gt;Learn a boundary orientation field alongside masks to assist polygonization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HiSup&lt;/td&gt;
&lt;td&gt;Use hierarchical supervision of vertices, line segments, and regions to learn masks suited to polygonization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PolyWorld / Re:PolyWorld&lt;/td&gt;
&lt;td&gt;Represent vertices and their connections as a graph&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BoundaryFormer&lt;/td&gt;
&lt;td&gt;Predict object boundaries as sequences of polygon points&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DINO-EdgeQuery&lt;/td&gt;
&lt;td&gt;Predict edges and their successor relations, then construct vertices from supporting-line intersections&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This table compares representations. The experiments presented in this article are not a performance comparison against these methods under identical conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Overall Architecture: From Image Recognition to Geometry
&lt;/h2&gt;

&lt;p&gt;DINO-EdgeQuery combines neural network predictions with deterministic polygon construction.&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    I[Input image] --&amp;gt; F[DINOv3 and Adapter Neck]
    F --&amp;gt; D[Instance Decoder]
    F --&amp;gt; R[ROI Tokenizer]
    D --&amp;gt;|Predicted masks and boxes| R
    R --&amp;gt; E[EdgeQuery Decoder]
    E --&amp;gt; H[Edge attributes and successor relations]
    H --&amp;gt; G[Cycle selection and line intersections]
    D --&amp;gt;|Predicted masks| P[Quality checks and duplicate suppression]
    G --&amp;gt; P
    P --&amp;gt; O[Coordinate transformation and GeoJSON export]&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The responsibilities are divided as follows:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DINOv3&lt;/td&gt;
&lt;td&gt;Neural network with frozen pretrained weights&lt;/td&gt;
&lt;td&gt;Extract image features&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adapter Neck and Instance Decoder&lt;/td&gt;
&lt;td&gt;Neural networks&lt;/td&gt;
&lt;td&gt;Predict masks, boxes, and other information for each building&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ROI Tokenizer, EdgeQuery, and prediction heads&lt;/td&gt;
&lt;td&gt;Neural networks&lt;/td&gt;
&lt;td&gt;Predict building edges and successor relations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cycle selection and line intersections&lt;/td&gt;
&lt;td&gt;Deterministic geometric processing&lt;/td&gt;
&lt;td&gt;Order edges and construct vertices&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quality Gate P1 / P2&lt;/td&gt;
&lt;td&gt;Deterministic checks and filtering&lt;/td&gt;
&lt;td&gt;Remove invalid geometry and duplicate candidates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coordinate transformation and export&lt;/td&gt;
&lt;td&gt;Geospatial processing&lt;/td&gt;
&lt;td&gt;Connect the output to GIS through GeoJSON&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Both edge prediction and successor relation prediction in EdgeQuery are neural network operations.&lt;/strong&gt; Geometric algorithms are used for polygon construction and quality checks after these predictions have been produced.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. DINOv3 and Instance Segmentation Provide Building-Level Cues
&lt;/h2&gt;

&lt;h3&gt;
  
  
  DINOv3 and the Adapter Neck
&lt;/h3&gt;

&lt;p&gt;We use DINOv3 with frozen weights to extract features from the input image. The Adapter Neck converts its intermediate features into multiscale features for the downstream components.&lt;/p&gt;

&lt;p&gt;The final implementation primarily uses feature maps with strides of 8, 16, and 32 relative to the input. The paper denotes these as 

&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
, 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;16&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
, and 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;32&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
.&lt;/p&gt;

&lt;p&gt;To supplement boundary information, features corresponding to F4 are extracted from the RGB image by a shallow CNN and added to the F8 path as a lightweight residual. The operation corresponding to Equation (2) in the paper is:&lt;/p&gt;


&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;′&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;ϕ&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size3 size1 mtight"&gt;&lt;span class="mord mtight"&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mrel mtight"&gt;→&lt;/span&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size3 size1 mtight"&gt;&lt;span class="mord mtight"&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mopen"&gt;&lt;span class="delimsizing size1"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;ϕ&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;stem&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord mathnormal"&gt;I&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mclose"&gt;&lt;span class="delimsizing size1"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;p&gt;The F4-equivalent features are not used directly as a separate mask input or ROI input. The downstream components use the corrected 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;′&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 together with 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;16&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 and 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;F&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;32&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
.&lt;/p&gt;
&lt;h3&gt;
  
  
  Masks Provide Cues About Building Location and Extent
&lt;/h3&gt;

&lt;p&gt;The Mask2Former-style Instance Decoder predicts a class, box, mask, and query embedding for each building candidate.&lt;/p&gt;

&lt;p&gt;These masks provide visual priors for identifying the target building and determining which feature region to access. They are also used to check the consistency of the generated polygons.&lt;/p&gt;

&lt;p&gt;The final polygon boundary is constructed from the edges predicted by EdgeQuery, rather than adopting the mask contour directly. However, EdgeQuery depends on instance segmentation and cannot recover buildings missed by the preceding stage.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. EdgeQuery: Predicting Candidate Edges for Each Building
&lt;/h2&gt;
&lt;h3&gt;
  
  
  ROI Tokenizer
&lt;/h3&gt;

&lt;p&gt;ROI stands for Region of Interest. The ROI Tokenizer uses each building's mask and box to generate local tokens from the corresponding multiscale features.&lt;/p&gt;

&lt;p&gt;In the final configuration presented in the slides, the ROI size is 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;24&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;×&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;24&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 and the feature dimension is 256. EdgeQuery predicts edges using this building-specific context.&lt;/p&gt;
&lt;h3&gt;
  
  
  A Query Is a Slot for a Candidate Edge
&lt;/h3&gt;

&lt;p&gt;EdgeQuery here does not mean asking an image questions in natural language. It refers to query slots used to predict the edges forming a building boundary.&lt;/p&gt;

&lt;p&gt;The final configuration uses 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;Q&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;96&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 building candidates per tile and 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;E&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;48&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 edge slots per building candidate. This does not mean that every building has 48 edges. The edges used in the output are selected based on activity, successor relations, and other information.&lt;/p&gt;

&lt;p&gt;The edge predictions include the following:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Information&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Activity&lt;/td&gt;
&lt;td&gt;A score used to determine whether an edge slot is active&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Center&lt;/td&gt;
&lt;td&gt;The center position of the edge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Direction&lt;/td&gt;
&lt;td&gt;The direction of the edge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Half-length&lt;/td&gt;
&lt;td&gt;Half the edge length; the full segment length is twice this value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mode and dominant axis&lt;/td&gt;
&lt;td&gt;Information about the edge mode and the building's dominant axis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relation embedding&lt;/td&gt;
&lt;td&gt;An embedding used to predict successor relations between edges&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The outputs provided by the prediction heads must be distinguished from the loss terms active in the final training configuration. In the final StageG2, the directly supervised quantities are activity, center, direction, half-length, and successor relations, as described below.&lt;/p&gt;
&lt;h3&gt;
  
  
  Successor Relations: Learning Which Edge Comes Next
&lt;/h3&gt;

&lt;p&gt;Even after candidate edges have been predicted, the set alone does not specify the order in which to trace the exterior boundary. The Successor Relation Head predicts directed relations indicating which edge follows a given edge.&lt;/p&gt;

&lt;p&gt;Let 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;S&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;q&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 be the successor score matrix for building candidate 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;q&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
. With 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;E&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 edge slots, this represents 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;E&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;×&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;E&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 relations. For a four-edge building, for example, the selected edges might form a closed sequence such as 1→3→2→4→1.&lt;/p&gt;

&lt;p&gt;The neural network predicts edge attributes and successor scores. Selecting the actual cycle from these outputs is a subsequent deterministic operation.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Constructing Vertices from Supporting-Line Intersections
&lt;/h2&gt;

&lt;p&gt;A supporting line is the infinite line obtained by extending a predicted segment in both directions. We define each supporting line from the edge center and direction, then use the intersections of adjacent supporting lines along the cycle as vertices.&lt;/p&gt;

&lt;p&gt;The following is Equation (4) from the paper, where 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;q&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 denotes a building candidate and 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;k&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 an edge candidate:&lt;/p&gt;


&lt;div class="katex-element"&gt;
  ParseError: KaTeX parse error: Expected '}', got '\right' at position 288: …\hat{\rho}{q,k}\̲r̲i̲g̲h̲t̲},\
\hat{\mathb…
&lt;/div&gt;


&lt;p&gt;
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord accent"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord mathbf"&gt;c&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="accent-body"&gt;&lt;span class="mord"&gt;^&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is the predicted center and 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord accent"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord mathbf"&gt;d&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="accent-body"&gt;&lt;span class="mord"&gt;^&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 the predicted direction. 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;R&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;π&lt;/span&gt;&lt;span class="mord mtight"&gt;/2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 rotates the direction by 90 degrees to obtain the line normal 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord accent"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord mathbf"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="accent-body"&gt;&lt;span class="mord"&gt;^&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
.&lt;/p&gt;

&lt;p&gt;By arranging the supporting lines in the order of the selected cycle 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;C&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;q&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;k&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="minner"&gt;…&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;k&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;V&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
, corners are determined by intersections of adjacent lines. This explicitly represents the long straight boundaries and corners of a building.&lt;/p&gt;

&lt;p&gt;Computing intersections alone does not always produce the correct building geometry. Errors in edge prediction or cycle selection can produce unnatural outlines or invalid polygons, so the following quality checks are applied.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Quality Gate P1 / P2: Checking Geometry and Duplicates
&lt;/h2&gt;
&lt;h3&gt;
  
  
  P1: Checking Geometry and Consistency with the Predicted Mask
&lt;/h3&gt;

&lt;p&gt;P1 checks the polygon constructed from line intersections using its IoU with the predicted mask, coverage, outside ratio, area ratio, and geometric validity. Self-intersecting and empty polygons are also excluded.&lt;/p&gt;

&lt;p&gt;The main thresholds reported in the paper are a mask IoU of at least 0.15, coverage of at least 0.35, and an outside ratio of at most 0.65. These are quality-check thresholds used during inference, separate from the IoU thresholds for evaluation against ground-truth polygons described later.&lt;/p&gt;
&lt;h3&gt;
  
  
  P2: Suppressing Duplicate Polygons Based on Containment
&lt;/h3&gt;

&lt;p&gt;P2 adds containment-based duplicate suppression to P1.&lt;/p&gt;

&lt;p&gt;With conventional IoU-based NMS, a small polygon inside a large polygon may remain because a substantial difference in area results in a low IoU.&lt;/p&gt;

&lt;p&gt;For example, if a polygon of area 10 lies entirely inside a polygon of area 100, their IoU is 0.1. Yet 100% of the smaller polygon is covered. This numerical example illustrates the difference between containment coverage and IoU.&lt;/p&gt;

&lt;p&gt;P2 removes 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 when another polygon 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 satisfies all of the following conditions, corresponding to Equation (5) in the paper:&lt;/p&gt;


&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="frac-line"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;∩&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;≥&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;0.50&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;≥&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mop"&gt;&lt;span class="mord mathrm"&gt;centroid&lt;/span&gt;&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;∈&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;p&gt;In other words, at least 50% of 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is covered, the other polygon has an equal or greater area, and the centroid of 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 lies inside it.&lt;/p&gt;

&lt;p&gt;This check uses predictions only; it does not access ground-truth data. Geometric validity checks also do not guarantee agreement with actual buildings. False detections and missed buildings must be evaluated separately.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. Two Training Stages, One Inference Pipeline
&lt;/h2&gt;
&lt;h3&gt;
  
  
  From Joint Optimization to Staged Training
&lt;/h3&gt;

&lt;p&gt;The presentation also explained our initial plan to jointly optimize instance segmentation, edge prediction, and polygon construction.&lt;/p&gt;

&lt;p&gt;In practice, changes in the initial masks and boxes made ROI conditions unstable. Mask and geometry losses converged at different rates, and gradients were difficult to handle through discrete cycle selection and validity checks. GPU memory needed to retain intermediate states for backpropagation through the full system was another constraint.&lt;/p&gt;

&lt;p&gt;This memory issue concerns &lt;strong&gt;attempting to treat instance segmentation, EdgeQuery, and polygon construction as a single large training graph&lt;/strong&gt;. It does not mean that the final staged training procedure or inference pipeline necessarily exhausts 96 GB of memory.&lt;/p&gt;

&lt;p&gt;The final implementation trains in two stages and then combines their weights:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;StageG1&lt;/th&gt;
&lt;th&gt;StageG2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Trainable components&lt;/td&gt;
&lt;td&gt;Adapter Neck and Instance Decoder&lt;/td&gt;
&lt;td&gt;ROI Tokenizer, EdgeQuery Decoder, and heads for edge attributes and successor relations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main frozen components&lt;/td&gt;
&lt;td&gt;DINOv3 and the EdgeQuery branch&lt;/td&gt;
&lt;td&gt;DINOv3, Adapter Neck, and Instance Decoder&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Training images&lt;/td&gt;
&lt;td&gt;All training tiles, including tiles without buildings&lt;/td&gt;
&lt;td&gt;Tiles containing buildings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main supervision&lt;/td&gt;
&lt;td&gt;Classes, boxes, masks, and boundaries&lt;/td&gt;
&lt;td&gt;Edge activity, center, direction, half-length, and successor relations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ROI conditions&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Ground-truth boxes and masks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;P1 and P2 are polygon-output quality-check profiles, not additional neural network training stages following G1 and G2.&lt;/p&gt;
&lt;h3&gt;
  
  
  StageG1: Boundary-Aware Instance Segmentation
&lt;/h3&gt;

&lt;p&gt;In addition to classification, box, and mask losses, we use a BCE loss on a thin band around the ground-truth boundary. This explicitly accounts for boundary errors that would otherwise contribute relatively little compared with the larger building interiors.&lt;/p&gt;

&lt;p&gt;Equation (6) in the paper combines classification, box, GIoU, mask BCE, mask Dice, and boundary BCE losses using weighted sums.&lt;/p&gt;
&lt;h3&gt;
  
  
  StageG2: Learning Edges and Connections with Stable ROIs
&lt;/h3&gt;

&lt;p&gt;StageG2 uses oracle ROIs defined by ground-truth masks and boxes. This stabilizes the local coordinates and target regions during edge learning.&lt;/p&gt;

&lt;p&gt;The active losses in the final model are given by Equation (7) in the paper:&lt;/p&gt;


&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mtable"&gt;&lt;span class="col-align-r"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;EdgeQuery&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="col-align-l"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;λ&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;act&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;act&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;λ&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;center&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;center&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;λ&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;dir&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;dir&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="arraycolsep"&gt;&lt;/span&gt;&lt;span class="col-align-r"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;+&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;λ&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;len&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;len&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;λ&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;succ&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;succ&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;p&gt;Losses related to vertices, rasterization, topology, regularity, and cycle consistency, which were included in the initial design, are not active in the final StageG2. Terms retained for compatibility or future extensions are masked to zero and excluded from the reported training objective.&lt;/p&gt;

&lt;p&gt;After training, the weights of G1 and G2 are combined. &lt;strong&gt;Inference uses neither ground-truth boxes nor ground-truth masks: the entire pipeline operates only on information predicted from the input image.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Preparing the Dataset for an Edge Representation
&lt;/h2&gt;

&lt;p&gt;We use aerial imagery and building annotations from the WHU Building Dataset. The 0.2 m resolution data in COCO format used in this study were prepared for EdgeQuery.&lt;/p&gt;

&lt;p&gt;COCO polygons cannot be used directly as edge supervision. Their exterior ring orientation and edge counts need to be standardized.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Split each original 1024×1024 image into four non-overlapping 512×512 tiles.&lt;/li&gt;
&lt;li&gt;Clip building polygons at tile boundaries and convert them to tile-local coordinates.&lt;/li&gt;
&lt;li&gt;Remove tiny fragments and unstable geometries resulting from clipping, and repair invalid geometry where possible.&lt;/li&gt;
&lt;li&gt;Remove duplicate vertices and standardize the exterior ring orientation in image coordinates.&lt;/li&gt;
&lt;li&gt;Simplify exterior rings with more than 48 edges while preserving topology where possible. Exclude polygons that collapse during this process.&lt;/li&gt;
&lt;li&gt;Generate edge attributes and ordered successor relations from the normalized exterior rings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The current implementation handles one exterior cycle per instance. MultiPolygons are split into individual polygon instances, while holes and nested structures are removed, flattened, or otherwise processed to fit this representation.&lt;/p&gt;

&lt;p&gt;This preprocessing is more than an image-format conversion. &lt;strong&gt;It also constrains the ground-truth geometry to match the edge count and exterior structure that the model can represent.&lt;/strong&gt; Since the same preprocessing is applied to the training and validation data, the evaluation results must be interpreted under these conditions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Capacity Configuration
&lt;/h3&gt;

&lt;p&gt;The presentation reported the following configuration for stable operation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Setting or measured value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input image&lt;/td&gt;
&lt;td&gt;512×512&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Microbatch size&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gradient accumulation&lt;/td&gt;
&lt;td&gt;2 steps; effective batch size of 16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Building queries&lt;/td&gt;
&lt;td&gt;
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;Q&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;96&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 per tile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge slots&lt;/td&gt;
&lt;td&gt;
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;E&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;48&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 per building candidate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ROI&lt;/td&gt;
&lt;td&gt;24×24, 256 channels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Peak VRAM&lt;/td&gt;
&lt;td&gt;49,470 MiB, approximately 48.3 GiB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In particular, the successor relation matrix grows quadratically with the number of edge slots. Increasing the edge capacity therefore increases computation and memory requirements for this component. The memory value above was measured for the adopted configuration and does not specify the requirements for every possible input or setting.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Experimental Results: What Changes When P2 Reduces Duplicates?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Inference Configuration
&lt;/h3&gt;

&lt;p&gt;The paper reports the following inference profile:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Instance confidence threshold&lt;/td&gt;
&lt;td&gt;0.60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mask binarization threshold&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mask-stage NMS&lt;/td&gt;
&lt;td&gt;0.75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Polygon-stage NMS&lt;/td&gt;
&lt;td&gt;0.75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge activity threshold&lt;/td&gt;
&lt;td&gt;0.15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge candidates retained for polygon construction&lt;/td&gt;
&lt;td&gt;Up to 32 per instance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boundary support&lt;/td&gt;
&lt;td&gt;Enabled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Collinear merging&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 48 edge slots used during training and the maximum of 32 edge candidates retained during inference are separate settings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Results on Validation Tiles Containing Buildings
&lt;/h3&gt;

&lt;p&gt;The following values are from Table 2 in the paper. P1 and P2 are quality-check profiles applied to the outputs of the same model.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;P1&lt;/th&gt;
&lt;th&gt;P2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Predicted polygons&lt;/td&gt;
&lt;td&gt;21,554&lt;/td&gt;
&lt;td&gt;19,203&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Union IoU&lt;/td&gt;
&lt;td&gt;0.7107&lt;/td&gt;
&lt;td&gt;0.7064&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boundary IoU, 2 px&lt;/td&gt;
&lt;td&gt;0.3746&lt;/td&gt;
&lt;td&gt;0.3710&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boundary IoU, 3 px&lt;/td&gt;
&lt;td&gt;0.4535&lt;/td&gt;
&lt;td&gt;0.4496&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recall@75&lt;/td&gt;
&lt;td&gt;0.6459&lt;/td&gt;
&lt;td&gt;0.6213&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Precision@75&lt;/td&gt;
&lt;td&gt;0.5486&lt;/td&gt;
&lt;td&gt;0.5924&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recall@80&lt;/td&gt;
&lt;td&gt;0.5442&lt;/td&gt;
&lt;td&gt;0.5258&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Precision@80&lt;/td&gt;
&lt;td&gt;0.4622&lt;/td&gt;
&lt;td&gt;0.5013&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Predictions / GT&lt;/td&gt;
&lt;td&gt;1.1774&lt;/td&gt;
&lt;td&gt;1.0489&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FP / GT&lt;/td&gt;
&lt;td&gt;0.2997&lt;/td&gt;
&lt;td&gt;0.2295&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-intersections / collapses to triangles&lt;/td&gt;
&lt;td&gt;0 / 0&lt;/td&gt;
&lt;td&gt;0 / 0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Precision@75 and Recall@75 are precision and recall when predicted polygons are matched to ground-truth instances at an IoU threshold of 0.75. The &lt;a class="mentioned-user" href="https://dev.to/80"&gt;@80&lt;/a&gt; metrics use 0.80. These are not AP metrics. FP / GT is the ratio of false positives to the number of ground-truth instances.&lt;/p&gt;

&lt;p&gt;With P2, the number of predicted polygons decreases by 2,351. Precision@75 improves by approximately 4.38 percentage points, and Precision@80 by approximately 3.91 percentage points. Meanwhile, Recall@75 decreases by approximately 2.46 percentage points, and Union IoU decreases by 0.0043.&lt;/p&gt;

&lt;p&gt;These results show that &lt;strong&gt;P2 improves precision at high IoU thresholds and reduces excessive outputs, with a trade-off in recall&lt;/strong&gt;. They should not be interpreted as a uniform improvement in IoU.&lt;/p&gt;

&lt;p&gt;Both P1 and P2 produced zero self-intersections and zero collapses to triangles in this evaluation. These are results for the outputs after quality checks; they do not guarantee correct geometry or positioning for every input.&lt;/p&gt;

&lt;h3&gt;
  
  
  Validation Tiles Without Buildings
&lt;/h3&gt;

&lt;p&gt;Table 3 in the paper reports results for 980 tiles without buildings:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;P1&lt;/th&gt;
&lt;th&gt;P2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Predicted polygons&lt;/td&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;81&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mean predictions per tile&lt;/td&gt;
&lt;td&gt;0.0918&lt;/td&gt;
&lt;td&gt;0.0827&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The number of predictions also decreases on background-only tiles, but false detections are not eliminated. The value 0.0827 is the mean number of predictions per tile, not an image-level rate indicating that 8.27% of images contain false detections.&lt;/p&gt;

&lt;h3&gt;
  
  
  Outputs During Validation
&lt;/h3&gt;

&lt;p&gt;Validation outputs: input image, ground-truth mask, predicted mask, candidate edges, selected cycle, and final polygon&lt;br&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%2Fsoxq1355ri2wvvl3khao.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%2Fsoxq1355ri2wvvl3khao.png" alt=" " width="800" height="592"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 1. DINO-EdgeQuery outputs for a validation image. Top row, left to right: input image, ground-truth mask, and predicted instance masks. Bottom row, left to right: unselected candidate edges, edges in the selected cycle, and final polygons constructed from line intersections. Source: Figure 2 of the original paper.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Figure 2 in the paper shows the input image, ground-truth mask, predicted instances, unselected EdgeQuery edges, selected cycle edges, and final polygons in sequence.&lt;/p&gt;

&lt;p&gt;This visualization traces how masks identify the target regions for individual buildings, how predicted edge candidates are selected, and how their intersections form the final outlines. The ground-truth mask in the top-center panel is shown for comparison only and is not used as an inference input.&lt;/p&gt;
&lt;h2&gt;
  
  
  10. Exporting Image-Space Polygons to GIS as GeoJSON
&lt;/h2&gt;

&lt;p&gt;Polygon vertices are initially obtained in image coordinates. To place them on a map, we transform them using the affine transform of the input GeoTIFF.&lt;/p&gt;

&lt;p&gt;The vertex transformation corresponding to Equation (9) in the paper is:&lt;/p&gt;


&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathbf"&gt;g&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;i&lt;/span&gt;&lt;span class="mpunct mtight"&gt;,&lt;/span&gt;&lt;span class="mord mathnormal mtight"&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;A&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="minner"&gt;&lt;span class="mopen"&gt;&lt;span class="delimsizing mult"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="delimsizinginner delim-size4"&gt;&lt;span&gt;⎣&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="delimsizinginner delim-size4"&gt;&lt;span&gt;⎡&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mtable"&gt;&lt;span class="col-align-c"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;x&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;i&lt;/span&gt;&lt;span class="mpunct mtight"&gt;,&lt;/span&gt;&lt;span class="mord mathnormal mtight"&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;y&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;i&lt;/span&gt;&lt;span class="mpunct mtight"&gt;,&lt;/span&gt;&lt;span class="mord mathnormal mtight"&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;&lt;span class="delimsizing mult"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="delimsizinginner delim-size4"&gt;&lt;span&gt;⎦&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="delimsizinginner delim-size4"&gt;&lt;span&gt;⎤&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;p&gt;
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;A&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is the GeoTIFF affine transform, 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;x&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;i&lt;/span&gt;&lt;span class="mpunct mtight"&gt;,&lt;/span&gt;&lt;span class="mord mathnormal mtight"&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;y&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;i&lt;/span&gt;&lt;span class="mpunct mtight"&gt;,&lt;/span&gt;&lt;span class="mord mathnormal mtight"&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 are vertex coordinates in the image, and 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathbf"&gt;g&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;i&lt;/span&gt;&lt;span class="mpunct mtight"&gt;,&lt;/span&gt;&lt;span class="mord mathnormal mtight"&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is the resulting map coordinate.&lt;/p&gt;

&lt;p&gt;The export pipeline reads the affine transform and CRS using Rasterio/GDAL and, where necessary, transforms coordinates to a target CRS such as EPSG:4326 using pyproj/PROJ. The polygons are then exported as GeoJSON together with attributes such as confidence scores and quality metrics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Viewing Inference Results in QGIS
&lt;/h3&gt;

&lt;p&gt;Inference results: three examples of exported GeoJSON building polygons overlaid in QGIS&lt;br&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%2F2zpsa86xusftnril442e.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%2F2zpsa86xusftnril442e.png" alt=" " width="799" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2. Final P2 polygons for test images, transformed into geographic coordinates and loaded into QGIS as GeoJSON. Red outlines show the exported building polygons. Source: Figure 3 of the original paper. Basemap © OpenStreetMap contributors.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The exported red polygons can be seen overlaid on the building outlines in the imagery. These test-image examples demonstrate the connection to GIS and are separate from the quantitative evaluation on the validation data in the preceding section.&lt;/p&gt;

&lt;p&gt;Here, “GIS-ready” means that the output can be delivered to GIS as vector data with geographic coordinates and checked geometric validity. It does not guarantee survey-grade accuracy or map updates without visual inspection.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Current Limitations and Future Development
&lt;/h2&gt;

&lt;p&gt;The current implementation has the following limitations:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;Current limitation or future direction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dependence on instance segmentation&lt;/td&gt;
&lt;td&gt;Buildings missed by the preceding stage cannot be extracted. A more robust preceding model is needed for different regions and sensors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Holes, courtyards, and multiple exterior rings&lt;/td&gt;
&lt;td&gt;The representation assumes one exterior cycle. Explicit support for multiple cycles and holes is needed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maximum edge count&lt;/td&gt;
&lt;td&gt;Fixed capacity and simplification of ground-truth geometry limit the representation of complex buildings.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quality-check thresholds&lt;/td&gt;
&lt;td&gt;The thresholds are manually designed and need adaptation to different resolutions and building forms.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Precision and recall&lt;/td&gt;
&lt;td&gt;Duplicate suppression may also remove valid predictions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evaluation scope&lt;/td&gt;
&lt;td&gt;In addition to aerial imagery, evaluation on satellite imagery, other regions, and other resolutions is needed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The paper identifies a learned polygon-quality prediction head, differentiable feedback from geometric construction to edge prediction, and support for multiple cycles and holes as future directions.&lt;/p&gt;

&lt;p&gt;The Adapter Neck is also designed as an interface that converts intermediate DINOv3 features into a common downstream representation. This is intended to make the downstream EdgeQuery architecture easier to reuse when adopting future vision foundation models. An actual replacement would still require feature integration, training, and evaluation.&lt;/p&gt;

&lt;p&gt;The presentation also introduced integration with Spatial Arrow as future work: generating model inputs at runtime from georeferenced raster and vector data, then connecting them to DINO-EdgeQuery's vector outputs. The evaluation reported here does not demonstrate that integration.&lt;/p&gt;

&lt;p&gt;DINO-EdgeQuery aims to turn building recognition results into structured edges and inspectable geometry. By learning edge positions, directions, and successor relations and constructing exterior boundaries through geometric processing, it connects image recognition with practical use in GIS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Paper and Presentation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kobayashi, Y. and Lai, Y. C. (2026): &lt;em&gt;DINO-EdgeQuery: Edge-First Polygon Decoding for Building Footprint Extraction from Satellite Imagery&lt;/em&gt;. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, L-4/W1-2026, 119–126. &lt;a href="https://isprs-archives.copernicus.org/articles/L-4-W1-2026/119/2026/" rel="noopener noreferrer"&gt;Paper&lt;/a&gt; / &lt;a href="https://doi.org/10.5194/isprs-archives-L-4-W1-2026-119-2026" rel="noopener noreferrer"&gt;DOI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://speakerdeck.com/lehupa/dino-edgequery-edge-first-polygon-decoding-for-building-footprint-extraction-from-satellite-imagery" rel="noopener noreferrer"&gt;FOSS4G Hiroshima 2026 presentation (Speaker Deck)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The equations reproduced in this article are the relevant portions of Equations (2), (4), (5), (7), and (9) in the paper. The quantitative results are from Tables 2 and 3. The GPU memory measurements, capacity settings, and explanation of the transition from joint optimization to staged training are based on the presentation slides.&lt;/p&gt;

</description>
      <category>geoai</category>
      <category>deeplearning</category>
      <category>transformer</category>
      <category>dinov3</category>
    </item>
    <item>
      <title>The RoPE Decay Curve Everyone Plots Is Noise, and Taking the Absolute Value Does Not Fix It</title>
      <dc:creator>Devanshu Biswas</dc:creator>
      <pubDate>Mon, 12 Oct 2026 11:20:59 +0000</pubDate>
      <link>https://dev.to/dev48v/the-rope-decay-curve-everyone-plots-is-noise-and-taking-the-absolute-value-does-not-fix-it-1ean</link>
      <guid>https://dev.to/dev48v/the-rope-decay-curve-everyone-plots-is-noise-and-taking-the-absolute-value-does-not-fix-it-1ean</guid>
      <description>&lt;p&gt;Rotary position embeddings do something that sounds impossible. They inject each token's &lt;strong&gt;absolute&lt;/strong&gt; position into the query and key — and the attention score between any two tokens depends only on the &lt;strong&gt;distance&lt;/strong&gt; between them. Move a whole sentence ten tokens later and every score inside it is unchanged.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Live, runs in your browser:&lt;/strong&gt; &lt;a href="https://dev48.in/dl/day81-rotary-embeddings.html" rel="noopener noreferrer"&gt;https://dev48.in/dl/day81-rotary-embeddings.html&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The identity, in one line
&lt;/h2&gt;

&lt;p&gt;Write a 2-D pair of the query at position &lt;em&gt;m&lt;/em&gt; as a complex number &lt;em&gt;q&lt;/em&gt;, and the key at &lt;em&gt;n&lt;/em&gt; as &lt;em&gt;k&lt;/em&gt;. RoPE multiplies them by e^(imθ) and e^(inθ):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Re[ (q·e^(imθ)) · conj(k·e^(inθ)) ] = Re[ q·conj(k)·e^(i(m−n)θ) ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The absolute positions appear only as their difference. Verified over 42 combinations of offset and shift — including a shift of &lt;strong&gt;4000&lt;/strong&gt; — worst deviation 1e−15. Additive sinusoidal embeddings, by contrast, give a different score for the same offset at different absolute positions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;rope&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;vec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;pos&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;th&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;thetas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;vec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;vec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;vec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;vec&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;vec&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;ang&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;pos&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;th&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ang&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ang&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ang&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ang&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔴 Now the part people get wrong
&lt;/h2&gt;

&lt;p&gt;"Attention under RoPE decays with distance." Plot it carelessly and you get a flat line of random scatter, because &lt;strong&gt;two independent random vectors have an expected dot product of zero at every distance&lt;/strong&gt;. The curve you drew was sampling noise.&lt;/p&gt;

&lt;p&gt;The usual next move is to average the &lt;em&gt;magnitude&lt;/em&gt; instead. &lt;strong&gt;That does not rescue it either:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;offset&lt;/th&gt;
&lt;th&gt;q against &lt;strong&gt;itself&lt;/strong&gt;
&lt;/th&gt;
&lt;th&gt;mean raw score, 600 pairs&lt;/th&gt;
&lt;th&gt;mean |score|, same pairs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;10.60&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;−0.07&lt;/td&gt;
&lt;td&gt;3.17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;8.05&lt;/td&gt;
&lt;td&gt;−0.37&lt;/td&gt;
&lt;td&gt;3.12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;256&lt;/td&gt;
&lt;td&gt;4.95&lt;/td&gt;
&lt;td&gt;−0.28&lt;/td&gt;
&lt;td&gt;3.04&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1024&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.69&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;−0.38&lt;/td&gt;
&lt;td&gt;3.02&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three columns, same vectors, same offsets. The mean raw score never leaves ±0.38 against a typical magnitude of 3.2. The mean |score| moves &lt;strong&gt;4% across the whole range&lt;/strong&gt;. Only the &lt;strong&gt;self&lt;/strong&gt; column collapses — and that is the decay people are describing: the pairs start perfectly in phase and dephase at different rates until their cosines cancel.&lt;/p&gt;

&lt;p&gt;It is dephasing, not attenuation, and it is a statement about a &lt;strong&gt;fixed&lt;/strong&gt; vector.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔴 The bug that produced the first, wrong measurement
&lt;/h2&gt;

&lt;p&gt;Each "random" vector got its own Park-Miller generator seeded by a nearby integer. &lt;strong&gt;Nearby LCG seeds give correlated streams.&lt;/strong&gt; The supposedly independent mean wandered to ±2.5 — an order of magnitude past its standard error — and looked like structure.&lt;/p&gt;

&lt;p&gt;One generator for the whole study, and it drops to ±0.38. If your "independent samples" come from &lt;code&gt;rng(seed + i)&lt;/code&gt;, they are not independent.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔴 NTK scaling cannot touch the fastest pair
&lt;/h2&gt;

&lt;p&gt;Train to 512, ask about 4096. It is tempting to blame the fast pairs, but they were already wrapping constantly inside the training window — another twenty turns is nothing new.&lt;/p&gt;

&lt;p&gt;The pair that leaves familiar ground is the &lt;strong&gt;slowest&lt;/strong&gt; one. Its period is longer than the whole context, so across training it swept only &lt;strong&gt;2.6% of a turn&lt;/strong&gt;; push the position eightfold and it swings into angles that never once appeared.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;strategy&lt;/th&gt;
&lt;th&gt;slowest pair's angle&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;trained, at 512&lt;/td&gt;
&lt;td&gt;0.162 rad&lt;/td&gt;
&lt;td&gt;what the model saw&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;untouched, at 4096&lt;/td&gt;
&lt;td&gt;1.295 rad&lt;/td&gt;
&lt;td&gt;8× past anything in training&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;position interpolation&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.162 rad&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;back exactly where it trained&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NTK-aware base&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.162 rad&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;back exactly where it trained&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both repairs land it in the same place. They differ at the &lt;strong&gt;fast&lt;/strong&gt; end: θ₀ = base⁰ = 1 whatever you do to the base, so &lt;strong&gt;NTK cannot slow the fastest pair at all&lt;/strong&gt;, while interpolation slows every pair equally and costs resolution between adjacent tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it is checked
&lt;/h2&gt;

&lt;p&gt;The verifier multiplies &lt;strong&gt;complex numbers&lt;/strong&gt; rather than using the real 2×2 form, extracts the rotation as a &lt;strong&gt;matrix&lt;/strong&gt; and tests RᵀR = I with det = +1, and re-measures the decay with a Marsaglia polar sampler so a bug in the page's generator cannot reproduce itself in the check.&lt;/p&gt;

&lt;p&gt;It caught a sign error in my closed form — &lt;code&gt;+&lt;/code&gt; where the derivation gives &lt;code&gt;−&lt;/code&gt; on the sin term.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;226 verifier asserts, 28 in-page checks, 0 failures.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>deeplearning</category>
      <category>python</category>
    </item>
    <item>
      <title>I Set Every Seed and Trained Twice. The Models Diverged at Step 1</title>
      <dc:creator>b1ackjack12</dc:creator>
      <pubDate>Mon, 12 Oct 2026 01:16:31 +0000</pubDate>
      <link>https://dev.to/b1ackjack12/i-set-every-seed-and-trained-twice-the-models-diverged-at-step-1-2h5b</link>
      <guid>https://dev.to/b1ackjack12/i-set-every-seed-and-trained-twice-the-models-diverged-at-step-1-2h5b</guid>
      <description>&lt;p&gt;There's a ritual at the top of every training script, mine included: &lt;code&gt;torch.manual_seed(0)&lt;/code&gt;, &lt;code&gt;np.random.seed(0)&lt;/code&gt;, and the comfortable belief that the run is now reproducible. I've typed it for years. Last week, while chasing a one-point accuracy difference I couldn't explain, I finally tested the belief directly: same seed, same data order, same model init, same machine, same everything — train ResNet18 for 200 steps, twice, and compare.&lt;/p&gt;

&lt;p&gt;The two loss curves matched at step 0 and &lt;strong&gt;diverged at step 1&lt;/strong&gt;. After 200 steps, the largest difference between corresponding weights was 0.237 — for parameters that mostly live between −0.1 and 0.1, that's not drift, that's a different model. Both runs were "seeded." Neither was reproducible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the randomness sneaks in
&lt;/h2&gt;

&lt;p&gt;The seeds did their job: initialization, data order, and every explicit random draw were identical, which is why step 0 agreed perfectly. The divergence enters in the &lt;em&gt;backward pass&lt;/em&gt;, and it isn't randomness in the usual sense at all — it's floating-point arithmetic meeting parallel hardware.&lt;/p&gt;

&lt;p&gt;Floating-point addition is not associative: &lt;code&gt;(a + b) + c&lt;/code&gt; and &lt;code&gt;a + (b + c)&lt;/code&gt; can differ in the last bit. GPU kernels sum gradient contributions across thousands of threads, many using atomic operations whose completion &lt;em&gt;order depends on the scheduler&lt;/em&gt; — which threads won the race on this particular run, on this particular clock. Same numbers, different addition order, last-bit differences in the gradients. Then SGD amplifies them: a 1e-8 disagreement in a gradient becomes a slightly different weight, which becomes a different activation, and the gap compounds every step. By my run's end, noise that began around the last decimal place a float can represent had grown into 0.237. It's the butterfly effect with a commit hash.&lt;/p&gt;

&lt;p&gt;None of this is a PyTorch bug; it's documented behavior, and &lt;code&gt;cudnn.benchmark&lt;/code&gt; (which I've &lt;a href="https://b1ackjack12.github.io/posts/tf32-cudnn-benchmark-measured" rel="noopener noreferrer"&gt;previously measured&lt;/a&gt; and left enabled) adds a second layer by autotuning to potentially different — nondeterministic — conv algorithms per run.&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%2Fl3sjg27j1wjq8tdv65ko.webp" 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%2Fl3sjg27j1wjq8tdv65ko.webp" alt="Two identical glowing racing lines leaving one starting gate and slowly fanning apart into visibly different paths across a dark circuit board landscape" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Does 0.237 matter? Only when you're asking small questions
&lt;/h2&gt;

&lt;p&gt;For final accuracy, this nondeterminism behaves like one more seed you didn't choose — my &lt;a href="https://b1ackjack12.github.io/posts/batch-level-gpu-augmentation-accuracy" rel="noopener noreferrer"&gt;augmentation experiment&lt;/a&gt; put ordinary seed-to-seed spread at ±0.3–0.5 points on a small CIFAR setup, and same-seed GPU noise lands in the same statistical bucket. If your effect size dwarfs that, you can ignore this whole post.&lt;/p&gt;

&lt;p&gt;The cases where it bites are the small questions, which are most of debugging. "Did my refactor change the numerics?" — you can't diff against the pre-refactor run, because &lt;em&gt;nothing&lt;/em&gt; diffs clean, ever. "Is this 0.4-point improvement my new loss term or luck?" — under nondeterminism you can't even hold the luck constant while you toggle the loss term. A/B comparisons where the honest answer requires the same noise on both sides are exactly where "seeded but nondeterministic" quietly wastes days. I know because the one-point mystery that started this post turned out to be two runs of the &lt;em&gt;same code&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix, and its real price
&lt;/h2&gt;

&lt;p&gt;PyTorch ships the switch; it just isn't the seed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use_deterministic_algorithms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backends&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cudnn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;benchmark&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
&lt;span class="c1"&gt;# and, for CUDA &amp;gt;= 10.2, before the process starts:
# CUBLAS_WORKSPACE_CONFIG=:4096:8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With those set, my two 200-step runs matched &lt;strong&gt;bit-for-bit&lt;/strong&gt;: max weight difference exactly 0, every loss value identical to the last digit. Two footnotes from the setup: the &lt;code&gt;CUBLAS_WORKSPACE_CONFIG&lt;/code&gt; environment variable is mandatory (you get a clear RuntimeError without it), and &lt;code&gt;use_deterministic_algorithms&lt;/code&gt; will refuse to run ops that simply have no deterministic GPU implementation — ResNet18 sailed through, but if your model contains one of the holdouts, the flag fails loudly and your options are CPU fallback or living without determinism for that op. Loud failure, for once, is the feature.&lt;/p&gt;

&lt;p&gt;The folklore price for all this is "2–3x slower," usually delivered as a reason not to bother. Measured, on the ResNet18 training step:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;precision&lt;/th&gt;
&lt;th&gt;default&lt;/th&gt;
&lt;th&gt;deterministic&lt;/th&gt;
&lt;th&gt;cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;fp32&lt;/td&gt;
&lt;td&gt;17.94 ms&lt;/td&gt;
&lt;td&gt;20.90 ms&lt;/td&gt;
&lt;td&gt;+16.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bf16 autocast&lt;/td&gt;
&lt;td&gt;12.42 ms&lt;/td&gt;
&lt;td&gt;14.37 ms&lt;/td&gt;
&lt;td&gt;+15.6%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sixteen percent. Some of that isn't even determinism proper — it includes giving up &lt;code&gt;cudnn.benchmark&lt;/code&gt;, which &lt;a href="https://b1ackjack12.github.io/posts/tf32-cudnn-benchmark-measured" rel="noopener noreferrer"&gt;I measured at ~3%&lt;/a&gt; on this model. The 2–3x stories presumably come from specific unlucky ops or older stacks, and maybe your model contains one; that's what the two-minute measurement is for. On mine, bit-exact reproducibility costs about as much as a modestly larger batch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the switch sits now
&lt;/h2&gt;

&lt;p&gt;My default stays fast and nondeterministic — for training throughput, 16% is real money, and ordinary training doesn't need bit-exactness. But the flag has earned a permanent spot in three situations: any debugging session that compares two runs (which is to say, any debugging session), numerics-sensitive refactors where I want &lt;code&gt;git diff&lt;/code&gt;-grade certainty that outputs didn't change, and small-effect experiments where the noise floor would otherwise eat the result. The deciding question is one sentence: &lt;em&gt;am I about to compare two runs and interpret the difference?&lt;/em&gt; If yes, 16% is the cheapest insurance in this entire optimization series — and unlike the seeds ritual, it actually buys what it claims to.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://b1ackjack12.github.io/posts/pytorch-same-seed-different-model/" rel="noopener noreferrer"&gt;b1ackjack12.github.io&lt;/a&gt; — an AI tech blog where every claim comes with a measurement. More experiments like this one live there.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pytorch</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>reproducibility</category>
    </item>
    <item>
      <title>Why Smaller AI Models Can Win in the Enterprise</title>
      <dc:creator>Freddy Lécué</dc:creator>
      <pubDate>Sun, 11 Oct 2026 19:41:19 +0000</pubDate>
      <link>https://dev.to/dailycontext/why-smaller-ai-models-can-win-in-the-enterprise-1m57</link>
      <guid>https://dev.to/dailycontext/why-smaller-ai-models-can-win-in-the-enterprise-1m57</guid>
      <description>&lt;p&gt;Much of the AI conversation today revolves around scale. More parameters. Larger context windows. Bigger clusters. Longer-running reasoning chains.&lt;/p&gt;

&lt;p&gt;But one of the most interesting lessons we have learned recently points in the opposite direction: &lt;strong&gt;sometimes smaller models win.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Our teams built a proprietary 1-billion-parameter foundation model in our own GPU environment. Rather than starting with an external model, we pre-trained a foundation model on proprietary transaction data, creating a reusable AI foundation tailored to the patterns, relationships, and structures embedded within those transactions.&lt;/p&gt;

&lt;p&gt;We then adapted that foundation model to fraud detection. Rather than reaching for the largest general-purpose model available, we explored what happens when a model is purpose-built for a specific domain and optimized for a clearly defined business objective.&lt;/p&gt;

&lt;p&gt;That distinction matters. Pre-training creates a reusable foundation that can support multiple downstream applications, while adaptation allows the model to specialize for a particular task. In our case, a 1-billion-parameter model proved capable of operating at enterprise scale while remaining efficient enough for production deployment.&lt;/p&gt;

&lt;p&gt;The results have been encouraging. The model identifies more fraud, &lt;strong&gt;improves detection accuracy by 24%&lt;/strong&gt; compared with previous approaches, and &lt;strong&gt;reduces false alerts by 14%&lt;/strong&gt;, all while operating within a framework of human oversight and strong governance controls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Engineering Lessons
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Domain-Specific Knowledge Can Outweigh Scale
&lt;/h3&gt;

&lt;p&gt;A model built for a specialized domain does not need to know everything. By pre-training on proprietary transaction data, the model develops domain-specific representations that capture behavioral patterns, transactional relationships, risk signals, and operational characteristics that matter most to the task at hand.&lt;/p&gt;

&lt;p&gt;For many enterprise use cases, domain relevance can be more valuable than additional parameters.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Smaller Models Have Real Operational Advantages
&lt;/h3&gt;

&lt;p&gt;Model quality is not the only metric that matters in production. Latency, throughput, infrastructure cost, and operational complexity are equally important considerations.&lt;/p&gt;

&lt;p&gt;Smaller models are typically faster to serve, less expensive to run, and easier to scale. In fraud detection, where decisions often need to be made while a transaction is being processed, those advantages translate directly into business value.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Pre-Training Creates a Reusable Asset
&lt;/h3&gt;

&lt;p&gt;What excites us most is not a single fraud use case.&lt;/p&gt;

&lt;p&gt;By pre-training a foundation model on proprietary transaction data, we created a reusable foundation that can be adapted to additional applications. The value is not limited to fraud detection. The same foundation can support multiple downstream tasks, allowing organizations to leverage pre-training investments across a broader set of business problems.&lt;/p&gt;

&lt;p&gt;The broader lesson is that AI progress is not solely about building ever-larger models. In many enterprise environments, the winning strategy may be to pre-train the right-sized foundation model on proprietary data and then adapt it to high-value business problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The future may not be exclusively about scaling up. In many cases, it may be about scaling intelligently.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>aie</category>
      <category>machinelearning</category>
      <category>gpu</category>
      <category>deeplearning</category>
    </item>
  </channel>
</rss>
