<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Adonai Vera on Medium]]></title>
        <description><![CDATA[Stories by Adonai Vera on Medium]]></description>
        <link>https://medium.com/@adonai-vera?source=rss-9f1a83a69971------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-_sWPsMTRfWMczuhtptTwg.png</url>
            <title>Stories by Adonai Vera on Medium</title>
            <link>https://medium.com/@adonai-vera?source=rss-9f1a83a69971------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 10 Nov 2026 05:38:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adonai-vera/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Antigravity CLI: How an Autonomous Coding Agent Actually Works, in a Real Example]]></title>
            <link>https://adonai-vera.medium.com/antigravity-cli-how-an-autonomous-coding-agent-actually-works-in-a-real-example-90a8bad5b0a6?source=rss-9f1a83a69971------2</link>
            <guid isPermaLink="false">https://medium.com/p/90a8bad5b0a6</guid>
            <category><![CDATA[fiftyone]]></category>
            <category><![CDATA[antigravity-cli]]></category>
            <dc:creator><![CDATA[Adonai Vera]]></dc:creator>
            <pubDate>Sat, 11 Jul 2026 06:16:53 GMT</pubDate>
            <atom:updated>2026-07-11T06:16:53.894Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Google’s Antigravity CLI can install its own tools, run multi-hour jobs, fix its own bugs, and switch models mid-task when it hits a limit. Here’s how it works, with FiftyOne Skills as the example.</em></p><p>We gave Antigravity CLI one real task: import 81,444 images into <a href="https://github.com/voxel51/fiftyone">FiftyOne</a> and run a full data-curation pipeline on all of them, no shortcuts.</p><h3>What is Antigravity CLI?</h3><p>Antigravity is Google’s agent harness for engineering work. It ships as a CLI (agy), an SDK, and an IDE. You type a task in plain English, and the agent plans it, calls tools, runs shell commands, edits files, and keeps going until it’s done, pausing to ask you before doing anything risky.</p><p>Three ideas make it more than “a chatbot in a terminal”:</p><ul><li><strong>Skills</strong>: small folders with a SKILL.md file describing a workflow: when to use it, and exactly how, step by step. Antigravity finds these automatically and turns each one into something it can use mid-conversation, and into a slash command you can call directly.</li><li><strong>Plugins</strong>: a Skill (or a bundle of Skills, subagents, and MCP servers) packaged as one installable unit. A plugin’s manifest is deliberately tiny: just a name and a description. Everything else it needs lives in fixed folders next to it.</li><li><strong>MCP servers</strong>: the <a href="https://antigravity.google/docs/cli/reference">Model Context Protocol</a> is how Antigravity talks to external tools. A skill library like FiftyOne’s exposes its own operators this way, so the agent can call them directly instead of guessing at a command line.</li></ul><p>On top of that, Antigravity supports <strong>multiple reasoning models in the same session</strong>: you can start on one and switch to another without losing context, useful when a long job runs into a quota limit.</p><h3>Installing it</h3><pre>curl -fsSL https://antigravity.google/cli/install.sh | bash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3NgQjLGNeK2xaJX_HoWmRw.png" /><figcaption><em>Antigravity CLI installation docs page</em></figcaption></figure><p>That downloads the agy binary to ~/.local/bin/agy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDaN2JMJrzOYzNZgEcyHdQ.png" /><figcaption><em>The real install script running in the terminal, installing Antigravity CLI 1.1.1</em></figcaption></figure><p>Then start it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z74WAoo-PfCu_khTIV-TrQ.png" /><figcaption><em>The Antigravity CLI welcome screen</em></figcaption></figure><p>Adding a skill library</p><p>Skills are what give the agent domain expertise it doesn’t have by default. You can write your own, or install an existing library, like <a href="https://github.com/voxel51/fiftyone-skills">FiftyOne Skills</a>: an open-source set of 18 skills covering more than 80 computer vision operators, importing datasets, running models, evaluating predictions, curating data, and more.</p><pre>curl -sL skil.sh | sh -s - voxel51/fiftyone-skills</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D44zH7Ax_IN0iMuctjyZGQ.png" /><figcaption><em>The skil.sh installer listing all 18 FiftyOne skills to choose from</em></figcaption></figure><p>The installer asks which agent to target. Antigravity is one option among several:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RbQGe6r1eMojNTxlagKUfg.png" /><figcaption><em>Choosing which agent to install the skills to. Antigravity is option 5</em></figcaption></figure><p>Once installed, /skills confirms what the agent can now see. In this run, that’s 20 total (18 from the FiftyOne library, plus 2 built into Antigravity itself):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pkC6i2GQqpk9l3yTKhtqVQ.png" /><figcaption><em>The /skills panel showing all loaded skills, including the fiftyone-skills: prefixed ones</em></figcaption></figure><p>Slash commands, and how to actually use them well</p><p>Type / at any point to open the command menu. The full list is in the <a href="https://antigravity.google/docs/cli/reference">CLI reference docs</a>; here’s what matters day to day:</p><ul><li><strong>/skills</strong>: Browse every loaded skill (local and global)</li><li><strong>/agents</strong>: Open the Agent Manager, switch custom agents, watch background subagents</li><li><strong>/mcp</strong>: Manage connected MCP servers</li><li><strong>/tasks</strong>: See background shell jobs the agent has running</li><li><strong>/model</strong>: Choose your reasoning model, persists across sessions</li><li><strong>/usage</strong> (alias /quota): Show how much of your model quota you’ve used</li><li><strong>/btw &lt;question&gt;</strong>: Ask a quick side question without derailing the main task</li><li><strong>/context</strong>: Open the context usage visualization panel</li><li><strong>/config</strong> (alias /settings): Open the full settings editor, including safety controls</li></ul><h3>Good habits when a task involves Skills</h3><p>Each one of these came up in the run below.</p><ol><li><strong>Run /skills before you write your prompt, not after.</strong> Knowing the exact skill names lets you reference them directly, the way the prompt below does: <em>“Use the fiftyone-import-dataset and fiftyone-dataset-curation skills…”</em> Naming the skill removes any guesswork about which workflow the agent should follow.</li><li><strong>Check /mcp before kicking off anything long.</strong> If a skill depends on an MCP server (like FiftyOne’s own tool server) and it isn’t connected, you want to know that in five seconds, not fifty minutes into a run.</li><li><strong>Use /tasks to watch long jobs instead of babysitting the chat.</strong> A skill-driven job that takes over an hour (like the import below) runs as a background task. /tasks shows you it’s alive without cluttering the conversation.</li><li><strong>Check /usage before a big autonomous run, and know /model is your escape hatch.</strong> Long, skill-heavy sessions burn through quota fast. When this session actually hit a quota wall mid-import, switching models with /model (from Gemini 3.5 Flash to Claude Sonnet 4.6) let it keep going without losing any of its progress or context.</li><li><strong>Use /btw for side questions instead of interrupting the main task.</strong> It runs in the background and doesn’t derail whatever the agent is already doing.</li><li><strong>/config is where you decide how much autonomy to grant.</strong> Tool Permission controls whether the agent asks before every action (request-review, the default), never asks (always-proceed), or something in between:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DK7IT0X91KbVN3MDnKAnzQ.png" /><figcaption><em>The /config settings panel, showing Tool Permission and other safety controls</em></figcaption></figure><h3>/model and /usage in practice</h3><p>This session started on <strong>Gemini 3.5 Flash (Medium)</strong>. Partway through, it hit this:</p><p>⚠ Individual quota reached. Please upgrade your subscription to increase your limits. Resets in 2h54m22s.</p><p>/usage (or /quota) is what would have flagged this coming. Once it happened, the fix was one command: /model, switch to <strong>Claude Sonnet 4.6 (Thinking)</strong>, keep going. The new model shows up immediately in the status bar, visible on this approval prompt a few minutes later:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UU23EIt6Wut3lm5fgYpZ5w.png" /><figcaption><em>An approval gate asking to confirm a new file, with Claude Sonnet 4.6 (Thinking) now shown as the active model</em></figcaption></figure><p>That’s the real value of the two commands together: /usage tells you when you’re about to run out of runway, /model lets you change lanes without starting over.</p><h3>The example: 81,444 images, no hand-holding</h3><p>Here’s the exact instruction given to the agent:</p><p>Use the fiftyone-import-dataset and fiftyone-dataset-curation skills to import the full huggan/wikiart dataset (https://huggingface.co/datasets/huggan/wikiart) into the FiftyOne installation at /Users/ado/Documents/fiftyone/env. Run the complete curation pipeline (no sampling), then use the fiftyone-playwright skills to monitor and validate the process in real time. If any step fails, automatically diagnose, fix, and continue until the pipeline completes successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b3ZuOpVXZXJ_osupoDWB2w.png" /><figcaption><em>The exact prompt being typed into the Antigravity CLI</em></figcaption></figure><p>Before touching anything, it read the three relevant SKILL.md files, checked the local environment, and came back with a three-phase plan (import, curation, Playwright validation) plus two questions: could it install a package, and should it keep a running work log.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ub5wd0_-tmf6KB4V5ZETtQ.png" /><figcaption><em>The agent’s proposed 3-phase plan, asking for approval before installing packages</em></figcaption></figure><p><strong>Import.</strong> Streaming images one at a time was too slow for 81,444 of them. The agent noticed, rewrote its own import script twice, and landed on a batched approach: download 8 parquet files in parallel (~4 GB at a time), extract to JPEGs, import, delete, repeat. This kept it within the ~74 GB of free disk space. It ran for nine batches, reporting real numbers along the way (13,584 samples, then 22,632, then 49,776 at 61%, then 58,824 at 72%), each one checked live in the FiftyOne App via Playwright rather than assumed from a log. After the quota-driven model switch above, it finished:</p><p>🎉 Import complete! All 81,444 samples have been imported successfully in 4012 seconds (~67 minutes).</p><p><strong>Curation: the actual “diagnose, fix, continue” test.</strong> The curation script computed embeddings on the Mac’s GPU, or was supposed to. The model quietly stayed on CPU instead, running at ~2 samples/second, which would have taken over 14 hours. The agent debugged this instead of stopping: it found that a device: “mps” setting wasn’t reaching the underlying PyTorch model, fixed it by loading the model directly and moving it to the GPU manually, hit a second bottleneck (a slow per-image processing pattern), and rewrote the script a third time using batched torchvision calls. That version benchmarked at 60–77 samples/second and, running for real, climbed past 180. At one point, seeing how fast it was going, the user suggested it didn’t need to process every image. The agent correctly stuck to the original “no sampling” instruction, noting the full run would finish in about 7 minutes anyway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hQ5mgmiVPYzfIuJCfX1aA.png" /><figcaption><em>The final pipeline summary printed by the agent</em></figcaption></figure><h3>Inside FiftyOne, after the run</h3><p>The result is something you can actually look at, not just a log saying “done.” All 81,444 samples are loaded with their artist, genre, and style labels intact:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VzQgyCQ9HYkX6PchvfTUaw.png" /><figcaption><em>The full WikiArt dataset loaded in FiftyOne, showing real paintings with artist, genre, and style labels</em></figcaption></figure><p>Every painting now also carries a uniqueness score alongside its labels, here 0.87 out of 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ui1jtNK0KUXnY0MvZDqFrw.png" /><figcaption><em>A single painting opened in the FiftyOne sample viewer, showing metadata and a uniqueness score of 0.87</em></figcaption></figure><p>That score is the real payoff of the curation pipeline: a value near 1 means an image looks unlike almost anything else in the dataset, while a value near 0 means it looks a lot like other images already in there. Sorting by uniqueness is how you’d find near-duplicates worth removing, or find the truly one-of-a-kind pieces, across 81,444 images without opening a single one by hand.</p><p>The img_umap embeddings tell an even bigger story about the dataset as a whole. Colored by genre:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wrj-7ldrN1UgixeR5Y1dew.png" /><figcaption><em>The Embeddings panel, colored by genre. Most points are ‘Unknown Genre’ but clusters are visible</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TErDHo3pqubphHw_6hrLuw.png" /><figcaption><em>The same Embeddings panel, colored by style instead. 27 art styles visibly clustering</em></figcaption></figure><p>The orange covering most of the genre map is Unknown Genre, meaning most paintings in this dataset simply don’t have a genre label. That’s not a bug in the pipeline. It’s a real, useful finding: genre coverage in this dataset is thin, and now you know it in one glance instead of discovering it painting by painting.</p><p>Compare that to the same map colored by style instead. There’s no dominant “unknown” blob here. All 27 styles show up as distinct, colorful regions, and visually similar styles (like Impressionism and Post_Impressionism) sit near each other on the map, exactly as you’d expect from an embedding that groups images by visual similarity. Put the two maps side by side and you get a genuine curation insight for free: this dataset’s style labels are far more complete and trustworthy than its genre labels, which tells you exactly where to focus annotation effort next.</p><h3>Try it yourself</h3><ol><li>Install Antigravity CLI.</li><li>Install a skill library, for example FiftyOne’s.</li><li>Run /skills to confirm what’s loaded, then describe your task in plain English, naming the skills you want it to use</li><li>For anything long-running: keep an eye on /tasks and /usage, and know /model is there if you need it</li></ol><p><strong>Sources and further reading:</strong></p><ol><li><a href="https://antigravity.google/docs/cli/install">Antigravity CLI documentation</a></li><li><a href="https://antigravity.google/docs/cli/reference">Antigravity CLI reference (slash commands, keybindings, settings)</a></li><li><a href="https://github.com/voxel51/fiftyone-skills">FiftyOne Skills on GitHub</a></li><li><a href="https://huggingface.co/datasets/huggan/wikiart">huggan/wikiart dataset on Hugging Face</a></li><li><a href="https://voxel51.com/blog/computer-vision-natural-language-interface">FiftyOne + natural language interfaces</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90a8bad5b0a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Run Google Colab Inside VS Code + Analyze Video with Qwen3-VL & FiftyOne]]></title>
            <link>https://adonai-vera.medium.com/run-google-colab-inside-vs-code-analyze-video-with-qwen3-vl-fiftyone-474a8cab10f2?source=rss-9f1a83a69971------2</link>
            <guid isPermaLink="false">https://medium.com/p/474a8cab10f2</guid>
            <category><![CDATA[multimodal-ai]]></category>
            <category><![CDATA[google-colab]]></category>
            <category><![CDATA[qwen]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Adonai Vera]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 16:13:30 GMT</pubDate>
            <atom:updated>2025-11-18T16:59:04.649Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5rCZhZyJMR6mq16-5ryMA.png" /></figure><p>This guide shows you how to:</p><ul><li>Use the new <strong>Google Colab extension inside VS Code</strong></li><li>Run notebooks on <strong>Colab GPU/TPU</strong> directly from your editor</li><li>Recreate the <strong>Qwen3-VL + FiftyOne</strong> video analysis demo</li><li>Explore your results interactively inside <strong>FiftyOne App</strong></li></ul><h3>How to Install It</h3><ol><li>Open <strong>VS Code</strong></li><li>Go to <strong>Extensions</strong></li><li>Search <strong>“Colab”</strong></li><li>Install the official Google Colab extension</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tPnWFJA97OvKPSTY1swGoA.png" /><figcaption>Extension Marketplace Colab</figcaption></figure><h3>Connect to a Colab Runtime</h3><ol><li>Open or create a .ipynb notebook</li><li>Click the <strong>kernel selector</strong> in the top-right</li><li>Choose: <strong>Colab → New Colab Server</strong></li><li>Sign in with your Google account</li><li>Pick <strong>GPU</strong> (recommended)</li></ol><p>Your notebook will now run on Colab hardware while you stay inside VS Code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4-x4k8X9TGepQe7AtVI7ow.gif" /><figcaption>Hello world Google Colab</figcaption></figure><h3>Qwen3-VL + FiftyOne Video Analysis</h3><p>Qwen3-VL is the newest and most powerful vision-language model in the Qwen family. It understands text, images, and video at a very deep level, and it can reason about them together. Compared to earlier versions, it’s better at everything — language, vision, long-context understanding, and complex reasoning.</p><p>It comes in different sizes and architectures (Dense and MoE), so you can run it on anything from edge devices to cloud GPUs. There are also special <strong>Instruct</strong> and <strong>Thinking</strong> versions depending on whether you need simple instructions or deeper reasoning.</p><h4>Why Qwen3-VL is powerful</h4><ul><li><strong>Visual agent abilities</strong> — It can understand computer and mobile screens, recognize UI elements, and even help complete tasks by calling tools.</li><li><strong>Visual coding</strong> — It can generate Draw.io diagrams, HTML, CSS, and JavaScript directly from images or videos.</li><li><strong>Stronger spatial reasoning</strong> — It understands object positions, viewpoints, occlusions, and can reason in both 2D and 3D.</li><li><strong>Long-context video understanding</strong> — Handles up to <strong>256K tokens</strong> (and expandable to 1M), meaning it can analyze long videos, books, and large documents with full recall.</li><li><strong>Better multimodal reasoning</strong> — Great at math, STEM, causal reasoning, and giving logical, evidence-based answers.</li><li><strong>Upgraded recognition</strong> — Trained on broad, high-quality visual data so it can recognize almost anything: people, products, landmarks, animals, and more.</li><li><strong>Expanded OCR</strong> — Supports 32 languages, works well even with blur, low light, tilted text, and long documents.</li><li><strong>Text understanding like a pure LLM</strong> — It reads, writes, and reasons with text at the same level as top language models.</li></ul><h4>Under the hood</h4><ul><li><strong>Interleaved-MRoPE</strong> for better long-horizon video reasoning.</li><li><strong>DeepStack</strong> to merge multi-level visual features for sharper image-text alignment.</li><li><strong>Text–timestamp alignment</strong> for precise event localization inside videos.</li></ul><p>Qwen3-VL understands videos, images, and text extremely well, and reasons across them like a top LLM, making it perfect for advanced video analysis setups like the one in this blog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-H6ImM-LmZ0f36Wz6A9fWw.jpeg" /><figcaption>Model Architecture Qwen3-VL</figcaption></figure><p>Now, we’ll recreate the workflow from the original notebook created by <a href="https://github.com/harpreetsahota204/qwen3vl_video/blob/main/qwen3vl_fiftyone_demo.ipynb">Harpreet Sahota</a>:</p><ul><li>Run <strong>Qwen3-VL</strong> on a video</li><li>Generate descriptions, events, OCR, analysis</li><li>Compute embeddings</li><li>Explore everything in <strong>FiftyOne</strong></li><li>Use custom prompts for structured results</li></ul><p>Paste each step into your notebook inside VS Code (connected to Colab).</p><h3>Step 1 — Install Dependencies</h3><p>Install the core libraries needed for video loading, multimodal modeling, and dataset exploration.</p><pre>!pip install -q fiftyone decord qwen-vl-utils transformers torch torchvision</pre><h3>Step 2 — Import FiftyOne + Register the Model Source</h3><p>Tell FiftyOne where the Qwen3-VL model definitions live so you can load it like any other<em> </em><a href="https://docs.voxel51.com/model_zoo/index.html"><em>zoo model</em></a><em>.</em></p><pre>import fiftyone as fo<br>import fiftyone.zoo as foz</pre><pre>foz.register_zoo_model_source(<br>    &quot;https://github.com/harpreetsahota204/qwen3vl_video&quot;,<br>    overwrite=True,<br>)</pre><h3>Step 3 — Load a Video Dataset</h3><p>Load your input videos — either from the <a href="https://docs.voxel51.com/dataset_zoo/index.html">FiftyOne zoo</a> or <a href="https://docs.voxel51.com/user_guide/import_datasets.html">your own files</a>, and prepare metadata required for temporal operations.</p><h4>Use a Zoo QuickStart video Dataset</h4><pre>dataset = foz.load_zoo_dataset(&quot;quickstart-video&quot;, max_samples=5)</pre><pre># Compute metadata (required for temporal operations)<br>dataset.compute_metadata() </pre><h3>Step 4 — Load Qwen3-VL</h3><p>Load the Qwen3-VL video understanding model from the model zoo, first download is large, this will take time the first run (If your setup can handle it, feel free to jump to the bigger 8B model).</p><pre>model = foz.load_zoo_model(&quot;Qwen/Qwen3-VL-4B-Instruct&quot;)</pre><h3>Step 5 — Basic Video Description</h3><p>This step uses Qwen3-VL to summarize each video in natural language.<br> The &quot;description&quot; mode generates a high-level explanation of what is happening in the clip.</p><pre><br>model.operation = &quot;description&quot;<br>dataset.apply_model(model, label_field=&quot;description&quot;, skip_failures=True)<br><br># View a sample description<br>sample = dataset.first()<br>print(sample.description_summary)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*VcmMhYTRURN5veqSP9baXg.gif" /></figure><h3>Step 6 — Comprehensive Analysis</h3><p>Beyond basic description, this mode extracts richer, multi-field insights. It may include objects, actions, attributes, and scene details depending on the model’s capabilities.</p><pre><br>model.operation = &quot;comprehensive&quot;<br>dataset.apply_model(model, label_field=&quot;analysis&quot;, skip_failures=True)<br><br>print(&quot;Analysis complete!&quot;)<br>print(f&quot;Fields added: {[f for f in dataset.get_field_schema().keys() if f.startswith(&#39;analysis&#39;)]}&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*c59Gq5zTMgKpc2-wudZvRg.gif" /></figure><h3>Step 7 — Temporal Event Detection</h3><p>Temporal localization identifies segments in the video where certain events occur. This is helpful when the model needs to reason over the timeline instead of analyzing the video as a whole.</p><pre>model.operation = &quot;temporal_localization&quot;<br>dataset.apply_model(model, label_field=&quot;events&quot;, skip_failures=True)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QpRZ-rSB88as-rrVyEmK9g.gif" /></figure><h3>Step 8 — OCR on the Video</h3><p>In this step, the model extracts text visible in the frames, perfect for signage, subtitles, labels, and any screen text that appears throughout the clip.</p><pre>model.operation = &quot;ocr&quot;<br>dataset.apply_model(model, label_field=&quot;ocr&quot;, skip_failures=True)<br><br>print(&quot;OCR complete!&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7X8MRrK42857xrV-7aX0xw.gif" /><figcaption>There are some gaps between the exact bbox location and what we expect, and we’re debugging that now</figcaption></figure><h3>Step 9 — Compute Embeddings</h3><p>We compute vector embeddings for each video. These embeddings represent the clip at a semantic level and can be used for similarity search, clustering, and visualization.</p><pre># Configure pooling strategy<br>model.pooling_strategy = &quot;mean&quot;<br><br># Compute embeddings<br>dataset.compute_embeddings(<br>    model,<br>    embeddings_field=&quot;qwen_embeddings&quot;,<br>    skip_failures=True<br>)<br><br>print(&quot;Embeddings computed!&quot;)</pre><h3>Step 10 — Similarity Search</h3><p>This section uses FiftyOne Brain to find videos that are semantically similar. It builds a similarity index using embeddings and then retrieves the closest matches to a query sample.</p><pre>import fiftyone.brain as fob<br><br># Build similarity index<br>fob.compute_similarity(<br>    dataset,<br>    brain_key=&quot;qwen_similarity&quot;,<br>    embeddings=&quot;qwen_embeddings&quot;<br>)<br><br># Find similar videos<br>query_sample = dataset.first()<br>similar_view = dataset.sort_by_similarity(<br>    query_sample,<br>    k=5,<br>    brain_key=&quot;qwen_similarity&quot;<br>)<br><br>print(f&quot;Found {len(similar_view)} similar videos&quot;)</pre><h3>Step 11 — UMAP Visualization</h3><p>This step projects the high-dimensional embeddings into a 2D space using UMAP. The result is a scatterplot-style visualization that helps reveal clusters and relationships between videos.</p><pre># Compute UMAP visualization<br>results = fob.compute_visualization(<br>    dataset,<br>    method=&quot;umap&quot;,<br>    brain_key=&quot;qwen_viz&quot;,<br>    embeddings=&quot;qwen_embeddings&quot;,<br>    num_dims=2<br>)<br><br>print(&quot;UMAP visualization computed!&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*tKzjK6Bj1FIlw2f2t6reKQ.gif" /></figure><h3>Step 12 — Launch the FiftyOne App</h3><p>Finally, we launch the interactive FiftyOne App to explore video clips, predictions, events, OCR, and similarity results visually.</p><pre>session = fo.launch_app(dataset, auto=False)<br>session.url</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*VcmMhYTRURN5veqSP9baXg.gif" /></figure><h3>Step 13 — Optional: Custom Prompts</h3><p>This allows you to define your own multimodal prompt. The model will return structured JSON responses following your schema — great for tagging, metadata extraction, or building custom workflows.</p><pre>model.operation = &quot;custom&quot;<br>model.custom_prompt = &quot;&quot;&quot;Analyze this video and provide:<br>{<br>  &quot;content_type&quot;: &quot;educational/entertainment/promotional/other&quot;,<br>  &quot;mood&quot;: &quot;calm/energetic/dramatic/neutral&quot;<br>}<br>&quot;&quot;&quot;<br><br>dataset.apply_model(model, label_field=&quot;custom_analysis&quot;, skip_failures=True)<br><br># View results<br>sample = dataset.first()<br>print(sample.custom_analysis_result)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OjBtSA8-DxFSeVhZAbzieQ.png" /></figure><pre>{<br>  &quot;content_type&quot;: &quot;educational/entertainment/promotional/other&quot;,<br>  &quot;mood&quot;: &quot;calm&quot;<br>}</pre><p>Modify the JSON schema to match your needs.</p><h3>Resources</h3><ul><li>Qwen3-VL <a href="https://docs.voxel51.com/plugins/plugins_ecosystem/qwen3vl_video.html">Docs Fiftyone</a>.</li><li>Create your own <a href="https://docs.voxel51.com/plugins/developing_plugins.html">pluing in Fiftyone</a>.</li><li>Qwen3-VL Video <a href="https://github.com/harpreetsahota204/qwen3vl_video/blob/main/qwen3vl_fiftyone_demo.ipynb">Demo Notebook</a> (Harpreet).</li><li>Google Colab <a href="https://github.com/googlecolab/colab-vscode">VS Code</a> Extension.</li><li>FiftyOne <a href="https://docs.voxel51.com">Documentation</a>.</li><li>Qwen3-VL <a href="https://github.com/QwenLM/Qwen3-VL">Github</a>.</li><li>Qwen3-VL <a href="https://qwen.ai/blog?id=99f0335c4ad9ff6153e517418d48535ab6d8afef&amp;from=research.latest-advancements-list">Blog</a>.</li></ul><h3>A huge thank you to:</h3><ul><li><strong>Harpreet Sahota (Voxel51)</strong> for creating the original Qwen3-VL + FiftyOne notebook</li><li>The <strong>Google Colab engineering team</strong> for shipping this incredible VS Code integration</li><li>The <strong>Google Developer Experts (GDE) program</strong> for supporting the initiative and empowering developers worldwide</li></ul><p>This combination of VS Code + Colab + FiftyOne + Qwen3-VL — is a real superpower for anyone working with video AI. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=474a8cab10f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gemini’s Research Trip: Embodied AI — A Not-So-Perfect Journey ]]></title>
            <link>https://adonai-vera.medium.com/geminis-research-trip-embodied-ai-a-not-so-perfect-journey-8a4a8e3da2bb?source=rss-9f1a83a69971------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a4a8e3da2bb</guid>
            <dc:creator><![CDATA[Adonai Vera]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 00:56:16 GMT</pubDate>
            <atom:updated>2025-02-13T00:56:16.483Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Gemini’s Research Trip: Embodied AI — A Not-So-Perfect Journey </strong>🚀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EE-q3pHaM2U7bPUfiXQbRA.jpeg" /><figcaption>Image generated by Gemini for this blog post.</figcaption></figure><p>So, For our Intelligent Agents class with Professor Ali Minai at the University of Cincinnati, we gave Gemini Advanced 1.5 Pro with Deep Research a task: generate a literature review about Embodied Intelligent Agents, Agentic AI, and Agent Models. Our assignment was to prompt the LLM to create a review paper with at least ten citations (since our group had two members), covering the topic area and including a bibliography. We were specifically instructed <em>not</em> to find the papers ourselves and feed them to the LLM; the LLM was supposed to generate the entire paper independently. We were allowed up to three prompts if the first attempt wasn’t satisfactory. We wanted to see if Gemini could really do research and what its limitations were. This blog post documents our experience, including our prompts, Gemini’s responses, and our critique of the final output.</p><p><strong>Initial prompt:</strong> <em>We are two students conducting a literature review on Embodied Intelligent Agents, Agentic AI, and Agent Models. Generate a comprehensive review paper that includes at least 10 citations from relevant research papers. The paper should follow a structured format with sections including an introduction, background, methodologies, key developments, challenges, future directions, and a conclusion. The citations should be formatted properly, and a bibliography should be included at the end. Ensure that the review reflects a broad and in-depth understanding of the topic.</em></p><p>Interestingly, even though our prompt was fairly simple, Gemini seemed to internally break down the task into smaller steps. It appeared to create a kind of research plan for itself, which included things like finding papers, summarizing concepts, identifying methodologies, and so on. This internal planning process wasn’t explicitly shown to us in the output, but it likely influenced how it structured the final paper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*dHEhhsbt626kVwlzQ9vPjA.png" /><figcaption>Screenshot research plan generated by Gemini</figcaption></figure><p><strong>What Gemini Made:</strong></p><p>Gemini made a paper. It had all the parts we asked for: intro, background, methods, the whole shebang. It even found some papers to cite. At first glance, it looked okay. It talked about embodied AI (agents with bodies!), agentic AI (agents that can think for themselves!), and agent models (computer versions of agents). It even mentioned generative agents (agents that can act like humans).</p><p><strong>But… There Were Problems:</strong></p><p>When we looked closer, things weren’t so great. It used a lot of words, but it didn’t seem to <em>really</em> understand what it was talking about. It was like it just read some stuff online and put it all together without really thinking about it.</p><p><strong>The Good Stuff (A Little):</strong></p><ul><li><strong>Structure:</strong> It followed the rules and put the paper together in the right way. Good job on that!</li><li><strong>Finding <em>Some</em> Papers:</strong> It did find some papers. But… (you knew there was a but, right?)</li></ul><p><strong>The Not-So-Good Stuff (A Lot):</strong></p><ul><li><strong>Not Really Understanding:</strong> The paper felt like it just put words together without really knowing what they meant. It used big words, but it didn’t show it really got the ideas.</li><li><strong>Citation Problems (Big Time!):</strong> This was the biggest issue. Remember, we needed good citations. Here’s the breakdown:</li><li><strong>Good:</strong> The first two citations were fine. Numbers 4 and 7 were good too! Yay!</li><li><strong>Kinda Good, But Not Quite:</strong> Numbers 3, 6, and 8 looked okay, but the links to the online papers (arXiv) were wrong.</li><li><strong>Wrong Author:</strong> Number 5 got the author totally wrong, and the link was bad too.</li><li><strong>Weird:</strong> Number 9 was strange. It got the name and author right, but the paper link was for a <em>different</em> version of the paper! It was like finding a recipe but getting the ingredients for a different dish.</li><li><strong>Didn’t Exist:</strong> Number 10 just wasn’t a real paper. Oops!</li><li><strong>Almost, But Not Quite:</strong> Number 11 was also a no-go. The paper they cited doesn’t exist, but there’s a <em>similar</em> one. They got that one wrong too!</li></ul><p><strong>Citation Statistics:</strong></p><p>Out of the 11 citations:</p><ul><li><strong>Perfect:</strong> 4</li><li><strong>Almost Right (But Link Wrong):</strong> 3</li><li><strong>Wrong Author/Link:</strong> 1</li><li><strong>Doesn’t Exist:</strong> 2</li><li><strong>Similar, But Wrong:</strong> 1</li></ul><p>So, more than half the citations had some kind of problem!</p><p><strong>Another Weird Thing:</strong></p><p>Gemini did find a <em>really</em> important paper from way back in 1950 by Alan Turing about computers and thinking. That was cool! But then, it jumped straight to papers from 2021. What happened to all the research in between? It’s like it skipped a whole bunch of important stuff!</p><p><strong>And… It Didn’t Use the Papers Much:</strong></p><p>Even when it <em>did</em> find okay papers, it didn’t really use them in the text. It was like it just put the names of the papers there without explaining how they related to what it was saying.</p><p><strong>What We Learned: AI Research Still Needs Human Help</strong></p><p>Gemini’s try at this project showed us some important things about how good AI is at research right now. It’s cool that it could make a paper and find some sources, but it also showed us that there’s a big difference between just putting words together and actually <em>understanding</em> stuff.</p><p>Here’s the breakdown:</p><ul><li><strong>Looks Good on the Outside:</strong> Gemini can make a paper <em>look</em> like it’s real. It can use fancy words, organize the information, and even put in citations. This can trick you at first. But it’s just on the surface.</li><li><strong>Doesn’t Really Get It:</strong> The main problem is that Gemini doesn’t really <em>understand</em> what it’s reading. It can write sentences, but it doesn’t really get the big ideas, how different research connects, or the little details that matter. You can see this when it tries to explain things — it’s all very simple and doesn’t show real understanding.</li><li><strong>Citations Were a Mess:</strong> The problems with the citations are a perfect example. It’s not just that some were wrong; it’s <em>how</em> they were wrong. Gemini didn’t seem to care if a source was good or bad, or if it even matched what the paper was saying. It just grabbed stuff without checking. Some of the “sources” were just Wikipedia or other websites that aren’t really good for academic research. It’s like using a children’s encyclopedia for a college paper! Humans, on the other hand, are careful about sources. They check if they’re real, if they’re good, and if they fit the paper. Gemini just doesn’t do that.</li><li><strong>Humans Are Still Important:</strong> This whole thing shows us why we still need human researchers. AI can be helpful for finding stuff, but it can’t think like a human. It can’t really understand what it finds, connect ideas, or make sure everything is correct. We need real people to guide the research, check the work, and make sure it’s good.</li><li><strong>AI Can Make Stuff Up:</strong> The fact that Gemini made up some citations or got them totally wrong is a big problem. AI can “hallucinate,” which means it can say things that sound real but are totally fake. This is scary, especially in research where everything needs to be true.</li><li><strong>Data Isn’t the Same as Knowing:</strong> Gemini shows us that just having lots of information isn’t the same as really <em>knowing</em> something. It can play with words and make sentences, but it doesn’t understand things the way people do. Knowing something means understanding the context, figuring out what it means, and connecting ideas.</li></ul><p><strong>The Big Picture:</strong></p><p>AI is getting better all the time, but it’s not ready to do real research by itself yet. It’s a good helper, but it can’t replace human researchers. We need people to do the thinking, to make sure things are right, and to really understand what’s going on. So, we don’t have to worry about robot researchers taking over just yet (probably!). The real danger is if we start trusting AI too much without realizing it still makes mistakes and needs our help.</p><p><strong>Disclaimer:</strong></p><p>The views and opinions expressed in this blog post are solely those of the authors and do not necessarily reflect the official policies or positions of the University of Cincinnati or Professor Ali A. Minai. This analysis is based on our personal experience with the specified LLM for a class assignment and should not be taken as a comprehensive evaluation of all LLMs or their capabilities.</p><p><strong>Full Review:</strong></p><p>You can find the complete, unedited literature review generated by Gemini (along with all our prompts and Gemini’s responses) in this <a href="https://storage.googleapis.com/tecla/Literature%20Review%20on%20Embodied%20AI%20_.pdf">PDF</a>.</p><p><strong>Acknowledgements:</strong></p><p>We would like to thank Professor Ali A. Minai for this insightful assignment, which provided valuable hands-on experience with LLMs and their capabilities.</p><p><strong>About the Authors:</strong></p><ul><li><a href="https://www.linkedin.com/in/adonai-vera/">Adonai Vera</a></li><li><a href="https://www.linkedin.com/in/aneesh-deshmukh/">Aneesh Deshmukh</a></li></ul><p><strong>Instructor:</strong></p><ul><li><a href="https://www.linkedin.com/in/ali-minai-7191055/">Professor Ali A. Minai</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a4a8e3da2bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cómo usar OpenCV’s “dnn” en Google Cloud Platform con GPU.]]></title>
            <link>https://adonai-vera.medium.com/c%C3%B3mo-usar-opencvs-dnn-en-google-cloud-platform-con-gpu-41b7c90f21b0?source=rss-9f1a83a69971------2</link>
            <guid isPermaLink="false">https://medium.com/p/41b7c90f21b0</guid>
            <category><![CDATA[inteligencia-artificial]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[opencv]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[switch-ai]]></category>
            <dc:creator><![CDATA[Adonai Vera]]></dc:creator>
            <pubDate>Sun, 10 Jan 2021 21:15:18 GMT</pubDate>
            <atom:updated>2021-01-10T21:15:18.163Z</atom:updated>
            <content:encoded><![CDATA[<p>Una guía completa de instalación de CUDA, CuDNN, NVIDIA Drivers y Opencv en las máquinas virtuales de GCP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p8Ffj0HLDNxmF3go5GUwIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*WR28D7T2CUYb6q4JUcA2Kw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DrY_yQf8IyUwul9H5PBo_g.png" /></figure><p>En la búsqueda de optimizar los modelos de IA configurando los servidores para que corran en GPU, descubrí diversos artículos que fueron cruciales para lograr mi objetivo, pero mi gran problema era que no tenia una guía completa para configurar mi máquina virtual, la cual no solo corriera en GPU, sino que corriera OpenCV con el módulo dnn que permite una inferencia de <strong><em>211–1549%</em></strong><em> </em>más eficiente<strong>.</strong></p><p>Por esta razón decidí crear una guía completa <strong><em>“zero to end”</em></strong> del proceso de configuración del servidor, la cual te ayudara a instalar en tu maquina virtual, CUDA 10.0, cuDNN 7.64.4, Opencv ‘dnn’, Ubuntu 18.04 y Chrome Remote Desktop. A continuación encontraras 6 pasos que espero sean de gran utilidad para ti y logres tener tu tecnología en producción y en GPU.</p><h4>Paso 1: Crea una cuenta en GCP</h4><p>Para empezar debes tener tu cuenta en GCP y si no la tienes, Google Cloud Platform te permite crear una cuenta totalmente gratuita y después del proceso de verificación te obsequia 300 créditos de bienvenida. Para registrarte ingresa al siguiente link <a href="https://cloud.google.com/">GCP</a>.</p><blockquote>Para poder usar GPU es fundamental que tengas habilitadas QUOTAS. Para habilitarlas debes ir a IAM &amp; Admin &gt; Quotas filtras por “Service: Compute Engine API” y “GPU” seleccionas “all regions” y “all quotas”. Según la GPU que desees usar debes solicitar un nuevo limite, escribir un comentario sobre las razones de uso.</blockquote><blockquote>Ten en cuenta que entre 1–2 días te habilitaran la GPU para que pueda ser utilizada.</blockquote><h4>Paso 2: Creación máquina virtual</h4><p>El primer paso es elegir el proyecto en donde estará alojado el servidor, seguido a esto se procede a crear el servidor. Para esto dirígete a “Compute engine” &gt; “VM Instance”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHc1mG-xzo35swvGJKzZUQ.png" /></figure><p>En este paso debes seleccionar el tipo de máquinas, la imagen y la GPU. En nuestro caso usamos una máquina “n1-standard-8&#39; CPU” y una “NVIDIA Tesla T4”, el sistema operativo fue Ubuntu 18.04 LTS. Por último, se habilitó el tráfico HTTP y HTTPS, y se dio clic en “crear”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NL7P31kOIAC1uJTV2k8MQ.png" /></figure><blockquote>Se recomienda generar políticas de seguridad para evitar posibles hackeos. Habilitar puertos de tráfico como HTTP y HTTPS permite generar puertas de vulnerabilidad que deberán ser analizadas al poner el sistema en producción.</blockquote><p>La máquina virtual tarde entre 5–10 minutos en configurarse. Seguido a esto, damos clic en SSH para iniciar un terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8hUct-yDSqS4lXUcYkIi-Q.png" /></figure><blockquote><strong>Recuerda que el costo por uso de GPU es elevado, si excedes los 300 créditos gratuitos, se cargaran a tu tarjeta de crédito. Se recomienda apagar la instancia si no está en uso.</strong></blockquote><h4>Configuración Chrome Remote Desktop (Opcional)</h4><p>Para muchos configurar todo el sistema desde el terminal, puede representar un proceso tedioso, es por eso que agregue esta configuración opcional para configurar Chrome Remote Desktop y acceder al servidor desde Chrome.</p><blockquote>Antes de comenzar, se recomienda configurar una clave con el comando <em>sudo passwd</em></blockquote><p>Desde el terminal SSH, se debe instalar y configurar Chrome Remote Desktop con los siguientes comandos:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c913ad37437da4601b7ec8c1ea9940cf/href">https://medium.com/media/c913ad37437da4601b7ec8c1ea9940cf/href</a></iframe><p>Luego de instalarlo correctamente, debes configurar el acceso al servidor, paro eso ingresa en<a href="https://remotedesktop.google.com/headless"> Remote Desktop </a>y sigue las instrucciones de configuración, al final encontraras un comando que debe ser ejecutado en el servidor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oL0kDMWkbx5LMG5sYRmZFA.png" /></figure><p>Seguido a esto, ya podrás acceder a la máquina virtual desde “Acceso remoto”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUBjdLpccJnrwlNdjG_K9w.png" /></figure><h4>Paso 3: Instalación de CUDA</h4><p>En este caso se instalará la versión 10.0 para Ubuntu 18.04. Sin embargo, si quieres instalar otra versión, en el siguiente link puedes obtener todas las versiones de <a href="http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/">CUDA</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0077ec082ad972685d2fd0767211d430/href">https://medium.com/media/0077ec082ad972685d2fd0767211d430/href</a></iframe><p>Para verificar la correcta instalación de los drivers y de CUDA utilizamos el comando “nvidia-smi”. Si los drivers fueron instalados correctamente, se mostrara la siguiente imagen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xdBboaUzDyta8S2XeWyoGA.png" /></figure><h4>Paso 4: Instalación de CuDNN</h4><p>La versión de CuDNN que se instalara es “CuDNN v7.6.4 para CUDA 10.0”, que se encuentra en el link de <a href="https://developer.nvidia.com/rdp/cudnn-archive">NVIDIA</a>.</p><p>Primero debes crear una cuenta y seleccionar la versión “cuDNN v7.6.4 (September 27, 2019), for CUDA 10.0”, el tipo de arquitectura es “cuDNN Library for Linux”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2jMPR_C_BmxX1DX899iIlg.png" /></figure><p>Seguido a esto navegamos hasta la carpeta en donde se encuentra el archivo “cudnn-10.0-linux-x64-v7.6.4.38.tgz” y realizamos la instalación de cuDDN.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e6fbf4a7757bd5e01016f40ed3caa6a/href">https://medium.com/media/2e6fbf4a7757bd5e01016f40ed3caa6a/href</a></iframe><p>Para verificar la correcta instalación de los drivers y de CUDA utilizamos el comando “nvcc -V”, en la siguiente imagen se observa la versión de CUDA:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*S0qYSmnWfobMvdKYaNuU0A.png" /></figure><h4>Configuración de entornos virtual en Python (Opcional)</h4><p>Es recomendable configurar entornos virtuales en Python, ya que te permite utilizar diferentes versiones de librerías dentro del mismo servidor, cada una de los entornos virtuales funciona de manera independiente.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c1ad644134955d7b02c2e1b2fce667c/href">https://medium.com/media/6c1ad644134955d7b02c2e1b2fce667c/href</a></iframe><p>Todos los paquetes de Python que instales dentro del entorno virtual estarán aislados de los paquetes instalados en toda la máquina.</p><pre># Ejemplo de instalación de numpy con PIP.<br>pip install numpy</pre><h4>Paso 5: Instalación de OpenCV y dependencias de GPU</h4><p>El primer paso es instalar todas las dependencias necesarias para ejecutar OpenCV “dnn” con NVIDIA GPU. Es importante instalarlas por fuera del entorno virtual debido a que son globales para toda la máquina.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0be8b79d1578634c75e59037736b0939/href">https://medium.com/media/0be8b79d1578634c75e59037736b0939/href</a></iframe><p>En caso de recibir el siguiente error:</p><pre>/usr/local/cuda-10.0/targets/x86_64-linux/lib/libcudnn.so.7 is not a symbolic link”</pre><p>Sigue los siguientes pasos:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/325559be539572050d2da1821dc20c00/href">https://medium.com/media/325559be539572050d2da1821dc20c00/href</a></iframe><p>Este error se presenta debido a que libcudnn.so.5 y libcudnn.so no son enlaces simbólicos. Para mayor información les dejo el siguiente <a href="https://askubuntu.com/questions/1025928/why-do-i-get-sbin-ldconfig-real-usr-local-cuda-lib64-libcudnn-so-7-is-not-a">foro</a>.</p><h4>Descargamos código fuente de OpenCV</h4><p>Este paso es el más importante, ya que instalar OpenCV desde PIP no permitirá que se ejecuten los modelos desde la GPU. Para descargar el código fuente debes seguir los siguientes comandos en el terminal. (Recuerda que debes estar por fuera del entorno virtual de Python.)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d58a7c27046cb67e7c542c08f6d46fec/href">https://medium.com/media/d58a7c27046cb67e7c542c08f6d46fec/href</a></iframe><h4>Versión de arquitectura CUDA</h4><p>Determinar la versión de la arquitectura de CUDA es fundamental, seleccionar una versión que no sea la de la GPU instalada representará que el módulo dnn de OpenCV no funcione correctamente, para determinar la versión accede a <a href="https://developer.nvidia.com/cuda-gpus">Developer Nvidia</a>, ahí debes buscar la GPU que tienes y encontrar la versión de la arquitectura, en este caso instalamos una “NVIDIA T4” y la versión es “7.5”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VKxJwTqcaCwACUj5UvX94Q.png" /></figure><p>Después de conocer la versión, se procede a compilar OpenCV, es importante que se lea a detalle los códigos para que se configure según la máquina virtual. En cada uno de las líneas de código agregué comentarios para que conozcas en donde debes cambiar a tu código.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7cacdbb948139146d2e4d6a60b45440f/href">https://medium.com/media/7cacdbb948139146d2e4d6a60b45440f/href</a></iframe><h4>Paso 6: Verificación de OpenCv “dnn” con GPU</h4><p>Para verificar la correcta instalación abrimos un terminal de Python dentro de nuestro entorno virtual e importamos opencv.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbff556ee6a1d42b95dc55d5d6522e66/href">https://medium.com/media/cbff556ee6a1d42b95dc55d5d6522e66/href</a></iframe><p>Para configurar GPU desde Python es muy sencillo, lo único que debes agregar son las siguientes dos líneas de código.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46eab3f38f050aa7b51a8fe703c36593/href">https://medium.com/media/46eab3f38f050aa7b51a8fe703c36593/href</a></iframe><p>Y de esta forma terminamos esta guía de configuración de una máquina virtual con NVIDIA GPU, OpenCV “dnn” en Google Cloud Platform.</p><blockquote>Agradecimientos a <a href="https://medium.com/u/1a0e941a39c">Shruti</a> , <a href="https://medium.com/u/777127e00790">Andrey Senin</a> y Adrian Rosebrock, por guiarme en el proceso de instalación y configuración del sistema.</blockquote><p><em>¡Espero que esta información les ayude en su proceso de optimizar sus modelos con GPU, éxitos!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4nqkWQ1fOBbjzvs_-vs4gw.jpeg" /><figcaption><a href="https://www.switchai.co/">https://www.switchai.co/</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41b7c90f21b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>