<?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 Raj Pulapakura on Medium]]></title>
        <description><![CDATA[Stories by Raj Pulapakura on Medium]]></description>
        <link>https://medium.com/@raj.pulapakura?source=rss-697417c205cb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kAhoIyXCOBjSIsYju4gjPw.jpeg</url>
            <title>Stories by Raj Pulapakura on Medium</title>
            <link>https://medium.com/@raj.pulapakura?source=rss-697417c205cb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 22:17:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raj.pulapakura/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[Running Multiple Codex Agents on Different Git Branches]]></title>
            <link>https://medium.com/@raj.pulapakura/running-multiple-codex-agents-on-different-git-branches-6e4ece844f88?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e4ece844f88</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 12:02:06 GMT</pubDate>
            <atom:updated>2026-03-04T12:02:06.910Z</atom:updated>
            <content:encoded><![CDATA[<p>This workflow lets you run <strong>multiple Codex agents in parallel</strong>, each working on a different branch using <strong>Git worktrees</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RkfQ8oflDVjZFmZkQGINOw.png" /></figure><p>I used this workflow to rapidly build 5 unique designs for my portfolio website, each with a different art direction. This type of rapid iteration is unprecedented, and if you aren’t building like this, you’re missing out on massive productivity gains.</p><h3>1. Start in your repo</h3><pre>cd your-project<br>git checkout main<br>git pull</pre><h3>2. Create a folder to hold the worktrees</h3><pre>mkdir -p ../wt</pre><p>This creates a directory where each parallel branch will live.</p><h3>3. Create branches + worktrees</h3><p>Each command creates:</p><ul><li>a new branch</li><li>a new working directory for that branch</li></ul><pre>git worktree add -b codex/p1 ../wt/p1 main<br>git worktree add -b codex/p2 ../wt/p2 main<br>git worktree add -b codex/p3 ../wt/p3 main<br>git worktree add -b codex/p4 ../wt/p4 main<br>git worktree add -b codex/p5 ../wt/p5 main</pre><p>Directory layout:</p><pre>your-project/<br>wt/<br>  p1/<br>  p2/<br>  p3/<br>  p4/<br>  p5/</pre><p>Each folder is an <strong>independent working copy of the repo</strong> that shares the same .git history.</p><h3>4. Run Codex agents in parallel</h3><p>Open <strong>one terminal per worktree</strong>.</p><p>Example:</p><p>Terminal 1</p><pre>cd ../wt/p1<br>codex</pre><p>Terminal 2</p><pre>cd ../wt/p2<br>codex</pre><p>Repeat for p3–p5.</p><p>Paste <strong>different prompts</strong> into each Codex session.</p><p>Each agent now works independently on its branch.</p><h3>5. Review results</h3><p>Check the changes in each candidate branch.</p><pre>cd ../wt/p1<br>git diff main</pre><p>Run tests if needed.</p><h3>6. Merge the branch you like</h3><p>From your main repo:</p><pre>cd your-project<br>git checkout feature/my-feature<br>git merge codex/p3</pre><p>Replace p3 with whichever branch produced the best result.</p><h3>7. Cleanup unused worktrees</h3><pre>git worktree remove ../wt/p1<br>git branch -D codex/p1</pre><p>Repeat for other unused branches.</p><h3>Result</h3><p>You now have a <strong>parallel AI workflow</strong>:</p><pre>Prompt A → branch codex/p1<br>Prompt B → branch codex/p2<br>Prompt C → branch codex/p3<br>Prompt D → branch codex/p4<br>Prompt E → branch codex/p5</pre><p>All generated simultaneously, then you <strong>review and merge the best result</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e4ece844f88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GPT 5.2 — the model we didn’t ask for]]></title>
            <link>https://medium.com/@raj.pulapakura/gpt-5-2-the-model-we-didnt-ask-for-3dc45bb6a6f0?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dc45bb6a6f0</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Sun, 14 Dec 2025 11:21:03 GMT</pubDate>
            <atom:updated>2025-12-14T11:21:03.764Z</atom:updated>
            <content:encoded><![CDATA[<h3>GPT 5.2 — the model we didn’t ask for</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ETH0TibpiZeciHS7XKnQ3g.jpeg" /></figure><p>Think about your favourite Chinese take-out spots.</p><p>Now imagine one of them, supposedly the best one, suddenly declares code-red due to fear of losing market share, and as a result, slightly enhances their flagship fried rice.</p><p>On paper, the dish looks better than ever — fancier description, there’s even a couple exotic ingredients. But the taste? Pretty much the same.</p><p>That’s how I feel about GPT 5.2.</p><p>Trained on “economically valuable tasks”. 44 occupations across 9 different industries. Evaluated on OpenAI’s very own GDPval.</p><p>But IMO the experience is pretty much indistinguishable from GPT 5.1.</p><p>Maybe I haven’t tested enough — I mean, it is only 5.1 to 5.2, not 5.1 to 6.0.</p><p>But regardless of the model itself, the fact that OpenAI is fighting so hard to compete such that it has to declare “code-red”, is a pretty good representation of the AI landscape at this point.</p><p>OpenAI has historically been the first to deliver key innovations — the release of GPT itself, and notably their reasoning model, o1.</p><p>But can they keep this up, especially given the large consumer bias towards companies like Anthropic and Google towards specific tasks such as coding and image generation?</p><p>Let’s see.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dc45bb6a6f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cursor 2.0 vibe-coding competition portfolio website: 5 Models duke it out]]></title>
            <link>https://medium.com/@raj.pulapakura/cursor-2-0-vibe-coding-competition-portfolio-website-5-models-duke-it-out-005d2b9177b3?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/005d2b9177b3</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Sun, 23 Nov 2025 11:53:51 GMT</pubDate>
            <atom:updated>2025-11-23T11:53:51.425Z</atom:updated>
            <content:encoded><![CDATA[<h3>The challenge</h3><p><strong>Cursor 2.0</strong> with Plan + Build mode</p><p><strong>5 SOTA models</strong>: GPT 5.1 Codex, Gemini 3 Pro, Claude Sonnet 4.5, Cursor Composer 1, Grok Code 1</p><p><strong>Challenge</strong>: Rebuild my shitty portfolio website with one-shot prompt (and answering any clarifying questions the model asks).</p><h3>The starting point</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlZ3SRnG2Rkw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlZ3SRnG2Rkw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlZ3SRnG2Rkw%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/038ddfbe7c66cbe0f2b3aa1e2c502c3b/href">https://medium.com/media/038ddfbe7c66cbe0f2b3aa1e2c502c3b/href</a></iframe><h3>Contestant profiles</h3><p>5 SOTA models (actually I don’t know if Composer 1 is considered SOTA):</p><ul><li><strong>OpenAI GPT-5.1 Codex Max: </strong>The battle-hardened veteran from OpenAI — built for long-running, agentic coding with compaction, multi-hour persistence, and serious scale.</li><li><strong>Gemini 3 Pro: </strong>Google’s sparse-MoE powerhouse — 1M token context, top-tier multimodal reasoning, and deep agentic coding muscle.</li><li><strong>Claude Sonnet 4.5</strong><em>: </em>Anthropic’s lean agent: excels at long-horizon coding, structured reasoning, and aggressive tool use</li><li><strong>Cursor Composer 1: </strong>Cursor’s own speed demon — a mixture-of-experts RL model trained in real codebases, built for blazing-fast multi-file edits and live in-editor agents.</li><li><strong>Grok Code Fast 1: </strong>xAI’s budget bruiser — low latency, huge 256k token context, structured function-calling, built for fast interactive dev workflows.</li></ul><h3>The instructions</h3><p>This is the prompt that was given to each model:</p><blockquote>I want to do a portfolio redesign. And I want do a complete haul-over of my current design. My current design is curvy, blue and vibrant, and bold. I want to redesign to something minimalistic, sleek, dark, bold, black, and straightforward, with perhaps some neat highlight features.</blockquote><blockquote>Feel free to plan out, and also feel free to completely change the codebase/layout/styles/typography/approach/components. Your first go doesn’t have to be perfect, we can iterate and refine. But just think “brand new”.</blockquote><p>This prompt was given to Cursor 2.0 for each model, with “Plan” model selected. I really love this feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*6lDaSvnRglCHz1W4F2NOcw.png" /></figure><p>After which, a plan is generated. Then I do the very arduous work of clicking “Build” (being a developer is so hard nowadays).</p><p>Scroll down to to see the final results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ti_TJaxJdt-iJfIkos_1ng.png" /></figure><h3>A quick note on my judging criteria</h3><p>Before I show you the output of each model, a quick note on how I’m evaluating their performance.</p><p>I decided to do a simple 3-topic rating:</p><ul><li><strong>Adherence</strong>: How well did the model follow the instructions?</li><li><strong>Quality</strong>: How good was the final output?</li><li><strong>DX</strong>: How much easier did the model make the developer’s (my) life?</li></ul><p>Another obvious benchmark would be speed but this is a creative experiment so I didn’t really care about that. They all took roughly the same time anyways.</p><h3><strong>The Outputs!</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fqq9adp1rCmQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dqq9adp1rCmQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fqq9adp1rCmQ%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/faa95a8bcbc32675a10a01605f328961/href">https://medium.com/media/faa95a8bcbc32675a10a01605f328961/href</a></iframe><h3>Workflow observations</h3><p>These are just some observations noted down while using each model:</p><ul><li><strong>OpenAI GPT-5.1 Codex Max: </strong>Asked 1 clarifying question, checked for build errors after implementing and a few styling mistakes</li><li><strong>Gemini 3 Pro: </strong>Asked 0 clarifying questions, did not check for build errors after implementing</li><li><strong>Claude Sonnet 4.5</strong><em>: </em>Asked a ton of clarifying questions, checked for build errors, and even updated the README.md at the end</li><li><strong>Cursor Composer 1: </strong>Didn’t really follow the prompt, didn’t check for build errors, asked 0 clarifying questions</li><li><strong>Grok Code Fast 1: </strong>Pretty much the same as Composer 1</li></ul><h3>The rankings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*xKs_oBxCa7OopDeIlUOaXQ.png" /></figure><ul><li>Codex’s implementation has that WOW factor.</li><li>Both Codex and Sonnet are the best quality-wise.</li><li>Codex had a few styling mistakes.</li><li>Sonnet had the best DX, and feels the most “deployable” after one-shot.</li><li>Gemini 3 Pro’s output feels like a run-of-the-mill SaaS website.</li><li>Composer 1 and Grok Code 1 didn’t even rebuild my website, they just slightly tweaked the existing one. I didn’t even bother listing Grok Code 1’s rankings because they were essentially the same as Composer 1.</li></ul><h3>Cursor 2.0 thoughts</h3><p>I’m loving the new Plan feature. It brings a sense of routine and rigidity to the whole developing process, and having it baked into the product makes it so much more easier to use.</p><p>As of today, Grok Code 1 doesn’t support Plan mode, so I actually used “Auto” for its planning. The implementation was done by Grok.</p><h3>Thoughts on the experiment</h3><p>This is largely a creative experiment. Each model is given a moderately detailed prompt, and full control over what they want to implement. I think it’s highly useful to use and evaluate different models, especially when doing more creative vibe-coding such as frontend development (not saying that frontend development isn’t highly technical — it is).</p><p>You will often find strengths and weaknesses in each model’s implementation, and can combine the strengths from all of them to create a really great output.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=005d2b9177b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GYM]]></title>
            <link>https://medium.com/@raj.pulapakura/gym-1bb55dafa053?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bb55dafa053</guid>
            <category><![CDATA[gym]]></category>
            <category><![CDATA[dedication]]></category>
            <category><![CDATA[focus]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 06:52:57 GMT</pubDate>
            <atom:updated>2025-11-08T06:52:57.762Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P-ovPd8rLHn_BUSXx0Ya0Q.jpeg" /></figure><p>I recently started going to the gym.</p><p>Why?</p><p>Because I want to build muscle and gain a greek god physique.</p><p>But there’s actually a deeper reason.</p><p>You see, I feel like my life has been lacking routine lately.</p><p>Sure, I get up everyday, go to work, come home, work on some code, watch a show, and do all that stuff.</p><p>But I felt like I wasn’t in control of my life, of my time.</p><p>I thought going to the gym would solve this — every day of the week (besides rest days), I go to the gym and work on strength. Surely that will build a great routine?</p><p>And yeah, I’ve been going to the gym for a month now. I’m pretty consistent, and I’ve gotten some good gains already.</p><p>But I thought that going to the gym would “seep into” other areas of my life, and automatically make me more disciplined in my work, my personal development etc.</p><p>But it’s not really like that. I go to work, go to the gym, and then I fall into the same bad habits. Ideally, I would want to keep grinding away, working on a side project or learning a new skill into the night.</p><p>But I’m really just doing the same time-wasting things as always.</p><p>What I’ve realised is this — just because you add something beneficial to your life, that doesn’t mean that the non-beneficial habits will go away. You need to consciously get rid of them.</p><p>Honestly, I decided to pick up writing articles after a long time. This is me adding another good habit to my arsenal — which literally contradicts what I just said.</p><p>But maybe, if I add enough good habits, I will no longer have time for my time-wasting habits.</p><p>Interesting…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bb55dafa053" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging the Gap: From LLMs to Autonomous Agents]]></title>
            <link>https://medium.com/@raj.pulapakura/bridging-the-gap-from-llms-to-autonomous-agents-93a51b6afce0?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/93a51b6afce0</guid>
            <category><![CDATA[cognition]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Mon, 18 Mar 2024 07:18:47 GMT</pubDate>
            <atom:updated>2024-03-18T09:18:58.705Z</atom:updated>
            <content:encoded><![CDATA[<h4>Exploring the limits of language-based representations and the role of hierarchical planning</h4><p>In this article, we examine the constraints of language in AI and analyse the role of hierarchical planning in developing autonomous AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVyj3dVRKEcf3ooxqipkzg.png" /></figure><h3>🗣️ The Limits of Language</h3><h4>Translating Information To Abstract Models</h4><p>We perceive the world through our senses, forming mental models of our surroundings. Our brain is capable of aggregating data from our sensory inputs, to form an abstract representation of our reality.</p><p><strong>Language</strong>, however, is not a sense but a medium to communicate these perceptions. It serves as a <strong>high-level, compressed information system </strong>derived from lower-level modalities such as tactile input, emotions, visual data and others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DI1h18SXBQq1k0Ua_nTbQ.jpeg" /><figcaption>World Model Comic. Image by <a href="https://worldmodels.github.io/">World Models</a></figcaption></figure><p>We have all heard the saying, ‘<em>a picture is worth a thousand words’</em>. But what does this mean in the context of information gain? <strong>Images and videos convey information more efficiently and richly than text, providing deeper and higher-quality representations.</strong></p><blockquote>The image of the world around us, which we carry in our heads, is just a model. Nobody in their head imagines all the world, government or country. They have only selected concepts, and relationships between them, and use those to represent the real system.<em>¹</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*sYNzLKozXcD3y8cYIQqS-A.jpeg" /><figcaption>Our brain prioritizes visual information over textual information. Image by <a href="https://www.annemccoll.com/blog/why-words-visuals-rule">Anne McColl</a></figcaption></figure><h4>The Bottlenecks of Current Artificial Models</h4><p>Present-day LLMs analyse vast chunks of linguistic information. However, there is a limit to the amount of reasoning capability you can extract from language. And besides, this seemingly massive volume of data is nothing compared to the data we input daily through perceiving the world around us.</p><blockquote><em>A child has seen 50 times more data than the LLMs that are trained on the totality of all text that is perfectly available - Yann Lecun</em></blockquote><h4>Learning Higher Quality Representations</h4><p>Future AI systems will be able to integrate even larger datasets of <strong>diverse </strong>data. The aim of incorporating numerous modalities into a single model is to achieve low-level abstract reasoning. Such a model should also be capable of expressing its reasoning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4vgXmzsMBvOVWya8RBS8A.png" /><figcaption>Architectural advances will be critical in enabling AI systems to assimilate higher-quality abstract representations. Image by <a href="https://ai.meta.com/blog/yann-lecun-ai-model-i-jepa/">Meta Research</a>.</figcaption></figure><p>To accomplish this, we must revisit our approaches to utilizing non-linguistic data for extracting valuable representations, likely requiring innovations in model architectures and training methodologies.</p><p>One such advance is the <a href="https://ai.meta.com/blog/yann-lecun-ai-model-i-jepa/">I-JEPA</a> architecture by Yann Lecun. The idea behind I-JEPA is to predict missing information in an abstract representation that’s more akin to the general understanding people have.</p><h3><strong><em>🌴 Hierarchical Reasoning</em></strong></h3><h4>Breaking it Down</h4><p>Hierarchical reasoning is a cognitive process where an entity, whether human or artificial, decomposes a broad goal, action, or piece of information into a structured sequence of smaller, more manageable parts or layers.</p><p>This decomposition facilitates understanding, planning, and problem-solving by establishing a clear, tiered framework that simplifies complex concepts or tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*ao3gXHVp0HT-yB4wQTdtnQ.jpeg" /><figcaption>An example of hierarchical reasoning. Image by <a href="https://www.nature.com/articles/srep18112">Nature</a></figcaption></figure><h4>Illustrating Hierarchical Planning with a trip to Paris</h4><p>To illustrate this, let’s take the example of taking a trip from New York to Paris. This is a relatively complex procedure, but we can break it down into a sequence of layered tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihfVY4ENJPYd9i3ug1RYOg.png" /><figcaption>Hierarchical plan for going from New York to Paris. Image by author.</figcaption></figure><p>While we could theoretically dissect each step down to the level of individual muscle movements and eventually quantum field theory, such detailed breakdowns aren’t practical or how human minds typically operate.</p><p>We don’t visualize every granular detail about the world or our actions within it. Instead, we conceptualize broader steps and underlying relationships to navigate our reality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kXCFxPaPNjW6tul_Ayrxpg.png" /><figcaption>Image from <a href="https://www.gettyimages.com.au/">Getty Images</a></figcaption></figure><p>On our trip from New York to Paris, we don’t meticulously plan every single movement; rather, we form a basic, abstract strategy. Yet, without some level of hierarchical planning, executing such a journey — or any complex task — would be unattainable.</p><p>For artificial entities to achieve autonomy, they must possess some key abilities:</p><ul><li>🤔 Discerning and transitioning between different layers of abstraction</li><li>🛠️ Possessing the necessary tools for task execution, which will likely arise from advancements in robotics.</li></ul><p>If you enjoyed reading this article, you should watch Lex Fridman’s and Yann Lecun’s insightful discussion. Yann is the Chief AI Scientist at Meta, and during this discussion, he talks about in greater detail the concepts we covered in this article, including the limits of language and how hierarchical planning is essential for truly autonomous agents.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F5t1vTLU7s40%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5t1vTLU7s40&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F5t1vTLU7s40%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a092d93eab65a180b75d7ffc7981777/href">https://medium.com/media/4a092d93eab65a180b75d7ffc7981777/href</a></iframe><p>Other articles you might like:</p><ul><li>📚 <a href="https://medium.com/@raj.pulapakura/multimodal-models-and-fusion-a-complete-guide-225ca91f6861">Multimodal Models and Fusion — A Complete Guide</a></li><li>📚 <a href="https://medium.com/@raj.pulapakura/vector-databases-a-beginners-guide-723ce809f52b">Vector Databases: A Beginner’s Guide</a></li><li>📚 <a href="https://medium.com/@raj.pulapakura/image-segmentation-a-beginners-guide-0ede91052db7">Image Segmentation — A Beginner’s Guide</a></li></ul><p>Citations:</p><ul><li>[1] <a href="https://en.wikipedia.org/wiki/Mental_model">https://en.wikipedia.org/wiki/Mental_model</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93a51b6afce0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Build an End-to-End Medical Deep Learning Project]]></title>
            <link>https://medium.com/@raj.pulapakura/how-to-build-an-end-to-end-medical-deep-learning-project-11ad932b5a8f?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/11ad932b5a8f</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[healthcare-technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 16:16:21 GMT</pubDate>
            <atom:updated>2024-03-12T10:58:44.469Z</atom:updated>
            <content:encoded><![CDATA[<h4>E2E MACHINE LEARNING</h4><h4>A walkthrough of my latest project: ClarityScan</h4><p>There are 5 steps to build an end-to-end machine learning project:</p><ol><li>🍎 Data Collection</li><li>🚆 Model Development</li><li>🪂 Model Deployment</li><li>🧑‍💻 Application Development</li><li>🚀 Application Deployment</li></ol><p>In this write-up I share how I followed these steps to deploy my latest project:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fv9OmIxve9Zs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dv9OmIxve9Zs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fv9OmIxve9Zs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2a933fd76a7da66c8adf49682a91c7b/href">https://medium.com/media/f2a933fd76a7da66c8adf49682a91c7b/href</a></iframe><h4>TLDW;</h4><p>The project is <strong>ClarityScan</strong>, which is an application that enables radiologists to enhance brain MRI scans and identify glioma tumors. Check it out <a href="http://clarityscan-447069715.us-east-1.elb.amazonaws.com/">here</a>.</p><h3>🍎 Data Collection</h3><p>Before we can get to ML, we need to take care of the most important stage in the ML pipeline: Data.</p><p>Choosing the right data to train/fine-tune your ML models can be the difference between your ML model succeeding, and failing miserably (Garbage In, Garbage Out).</p><h4>🤔 Here are some considerations for data collection:</h4><ul><li>👉 <strong>Training data = Production data</strong>. The dataset should be representative of the data that will be fed into the system during production/inference.</li><li>👉 <strong>Check for class imbalance.</strong> If you’re data is imbalanced (e.g. in tumor segmentation), then the model will focus most of its efforts on optimizing for the majority class, which is often not the class we care about.</li></ul><p>For ClarityScan, I used the <a href="https://www.kaggle.com/datasets/mateuszbuda/lgg-mri-segmentation">Brain Tumor Segmentation dataset</a>, which contains images of MRI scans and their corresponding tumor segmentations.</p><p>This data is severely imbalanced, as the actual tumor often occupies a minority portion of the entire scan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKnn1w-aHTFi49fupznHlw.png" /><figcaption>Tumors occupy a small portion of the entire scan. Image from <a href="https://www.semanticscholar.org/paper/Brain-Tumor-Segmentation-in-Multi-modality-MRIs-and-Zhan-Zhan/005c6e8d0c34c8761897d3a0f5cf091c7c39f20a">source</a> with alterations.</figcaption></figure><p>How did I overcome this challenge? By carefully developing the deep learning model…</p><h3>🚆 Model Development</h3><p>When developing a model, whether its a simple tabular data classifier, a deep image segmentation model, or a large language model, there are some important things to keep in mind.</p><h4>🤔 Here are some thoughts on developing models:</h4><ul><li>🤏 <strong>Smaller is better. </strong>Low latency is critical for optimizing the end-user experience. Aim to minimize the size of the model. Always start with the smallest possible model, and work your way up if required.</li><li>🎯 <strong>Choose the right loss function. </strong>Especially for datasets with imbalanced classes, picking the right loss function is imperative. Different loss functions optimize for different goals, and you may have to experiment with many of them before you find the right one.</li></ul><p>For image segmentation, there are a myriad of loss functions to choose from. Cross Entropy, Focal Loss, Dice Loss, Tversky Loss, IOU… the list goes on.</p><p>But what was I optimizing for? Well, since tumors only occupy a small portion of each image, the classes are severely imbalanced. So I would want a loss function which focuses on the minority class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2WqZjPeiMfj5ECFHqKOXw.png" /><figcaption>My handwritten notes, weighing up different loss functions and architectures. Image by author.</figcaption></figure><p>After experimenting with different loss functions (and combinations of them), I settled with the Dice Loss, which naturally optimizes for the predicted image to overlap with the ground truth, resolving the class imbalance issue.</p><p>In this case I didn’t have to alter the dataset directly, but in other cases you can use techniques such as oversampling and undersampling to control class imbalance.</p><h3><strong>🪂 Model Deployment</strong></h3><p>There are several options for deploying models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DNdCgOZ8y1jOaA4_-MCo9Q.png" /><figcaption>3 common ways to deploy models. Image by author.</figcaption></figure><p>However, the most common route is to serve a model via an HTTP endpoint. And for deep learning models, you would prefer to use servers that have access to GPUs, so inference is ⚡lightning quick.</p><p><a href="https://modal.com/">Modal</a> is a great solution for this. I use Modal a lot for deploying models to production endpoints. It provides easy access to top-tier GPUs, and you also get $30 free credits per month, so development is blissful.</p><h4>🤔 Things to keep in mind when deploying ML models:</h4><ul><li><strong>🪂 How should I deploy? </strong>For small models, serving them in the application bundle should be fine. For models with low <a href="https://medium.com/@raj.pulapakura/2-design-decisions-that-can-make-or-break-your-ml-system-14fbb22be512#9c2b">cardinality</a>, storing all predictions in a table will do. For most other cases, you’ll want to deploy a API/service.</li><li>💪 <strong>Do I need GPUs for inference? </strong>If you are deploying deep learning models, you can dramatically reduce latency by using GPUs for inference. <a href="https://modal.com/">Modal</a> makes it super easy to do this.</li></ul><p>For ClarityScan, I had two models, a tumor segmentation model, and a denoising model. Thus, I created two HTTP endpoints on Modal to serve requests to each model.</p><h4>📚 Check out some of my write-ups on ML model deployment:</h4><ul><li><a href="https://medium.com/@raj.pulapakura/data-to-deployment-crafting-a-robust-machine-learning-pipeline-5cbff6fa60fc">Data to Deployment: Crafting a Robust Machine Learning Pipeline</a></li><li><a href="https://medium.com/@raj.pulapakura/2-design-decisions-that-can-make-or-break-your-ml-system-14fbb22be512">2 Design Decisions that can Make or Break your ML System</a></li></ul><h3><strong>🚀 Application Development &amp; Deployment</strong></h3><p>While this write-up focuses mostly on machine learning, I thought I would mention the final component: the end-user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U2DWKGKngbkjS6UNgEwIHA.png" /><figcaption>ClarityScan website. Image by author.</figcaption></figure><h4>🤔 Keeping the end-user in mind, here are some things to think about:</h4><ul><li>🕔 <strong>Minimize latency</strong>. Of course, this depends on the specific scenario. In some situations, latency isn’t the primary concern, perhaps accuracy is. But generally, reduce the time-to-answer as much as possible, through minimizing the model size, utilizing GPUs, or through techniques such as quantization.</li></ul><p>For the denoiser model, I was initially using a copy of the segmentation model, which had around 27M parameters. I realized that a smaller model would suffice, and I brought it down to around 500,000 parameters (54x decrease), with no degradation in performance.</p><h4>Application Development</h4><p>The website I built essentially serves as a “face” for the 2 deep learning models. My go-to stack of choice for building websites is the Next.js + Tailwind CSS stack, and it’s what I used for ClarityScan.</p><h4>Application Deployment</h4><p>Initially I was hoping to deploy my application to Vercel as it integrates quite nicely with Next.js. However, apparently Vercel throttles API requests to 5 seconds, and this wasn’t enough time to run inference on the models.</p><p>Instead, I opted for AWS. Using AWS ECS, I deployed my application as a containerized service, and plopped a load balancer on top so that the world can use it!</p><h3>🎚️ ClarityScan AOIs</h3><p>Some potential areas of improvement for ClarityScan:</p><ul><li><strong>💪 Increase model scope</strong>. Currently the model is able to identify glioma brain tumors. It would be nice if this could be expanded to other illnesses, such as AVMs (Arteriovenous malformations).</li><li><strong>🗃️ Accommodate more file formats. </strong>Currently, ClarityScan can handle common file formats including TIFF, JPG and PNG files. However MRI scans can be stored in other formats such as NII or DICOM, adding support for these formats is a reasonable next step.</li></ul><h3>📚 Project Resources</h3><p>Building this project has been an insightful journey for me. Here are all of the resources I created while developing this project:</p><h4><strong>📝 Articles</strong></h4><ul><li><a href="https://medium.com/@raj.pulapakura/image-segmentation-a-beginners-guide-0ede91052db7">Image Segmentation — A Beginner’s Guide</a></li><li><a href="https://medium.com/@raj.pulapakura/multimodal-models-and-fusion-a-complete-guide-225ca91f6861">Multimodal Models and Fusion — A Complete Guide</a></li><li><a href="https://www.linkedin.com/posts/rajpulapakura_brain-tumor-analysis-pdf-report-activity-7164961251746365440-i9if/">Brain Tumor Analysis PDF Report</a></li><li>How I Built an End-to-End Medical Deep Learning Project (this article)</li></ul><h4><strong>📽️ Videos on my YouTube channel</strong></h4><ul><li><a href="https://www.youtube.com/watch?v=v9OmIxve9Zs">Project Demo</a></li><li><a href="https://www.youtube.com/watch?v=SvfRLuvJyn8">Technical Walkthrough</a></li></ul><p>To those of you who are working on your own machine learning projects, I hope this write-up gave you some insights and inspiration on how to approach your project.</p><p>To continuous learning and growth!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11ad932b5a8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Lessons from My SWE Internship at a Startup]]></title>
            <link>https://medium.com/@raj.pulapakura/3-lessons-from-my-swe-internship-at-a-startup-1896ad469555?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1896ad469555</guid>
            <category><![CDATA[lessons-in-life]]></category>
            <category><![CDATA[milestones]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[internships]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Thu, 29 Feb 2024 14:39:42 GMT</pubDate>
            <atom:updated>2024-02-29T14:39:42.513Z</atom:updated>
            <content:encoded><![CDATA[<p>👋 Hey there! I’m Raj, a 16-year-old software engineer who’s just concluded my 1.5-month internship at a tech startup in Melbourne. Although the journey was short and sweet, I’ve learned so much and the lessons I’ve garnered will continue to shape my future endeavours for years to come.</p><p>One month ago, I could have never anticipated the enormous growth I would experience as a software engineer, communicator, and problem-solver. These insights will be instrumental in my future corporate and personal ventures.</p><h3>🪴 Expect Rapid Expansion and Growth</h3><p><strong>Never underestimate your learning capabilities</strong></p><p>I’m blown away by the amount of technical knowledge I’ve acquired in such a short span. Some of my key learnings include:</p><ul><li>🛳️ Implementing a CI/CD pipeline with GitHub Actions</li><li>🪄 Automating resource deployment with TerraForm</li><li>🛠️ Engineering a microservices architecture with Docker and AWS ECS</li><li>🕹️ Deepening my understanding of AWS and system architecture</li><li>⚙️ Integrating with services such as Firebase, Stripe and SendGrid</li><li>⚔️ Writing clean and scalable Python and TypeScript code</li></ul><p>I guess this bullet-speed learning should be expected from an internship, as the goal is to get exposed to a vast amount of technologies and learn as much as possible. And that’s exactly what I did.</p><p>Looking back, I’m grateful for this internship. If not for this journey, I wouldn’t have experienced the exponential learning that occurred during this month.</p><p>Also, since this was a startup, there were barely any guidelines for executing the project, which gave me immense freedom in choosing the technologies I wanted to use. So, a lot of my learning was self-driven, as I explored and experimented with new technologies, and figured out what works best. And I loved every bit of it 😊.</p><h3><strong>📝 </strong>The Power of a Clear Vision</h3><p><strong>Forge a roadmap for your project</strong></p><p>Plunging headfirst into a technical project, especially one that has implications for clients, isn’t always the best strategy. I learned this the hard way.</p><blockquote><strong>Context</strong>: Throughout my internship, my main task was to build a property report generation tool. This tool allowed users to input their Area of Interest (AOI), such as an address or parcel number, to fetch data from various sources and APIs. The data was then consolidated and visualised using graphs, and sent as a PDF report to the user’s email.</blockquote><p>The technical specifications of the project weren’t clearly defined at the outset, so I had the freedom to design the solution as I saw fit. I dove straight in, and within a week, I had a working skeleton for the project.</p><p>However, once the initial hurdles were overcome, a plethora of new challenges emerged, including emailing, authentication, payments, deployment… and the list was endless.</p><p>I hadn’t even considered most of these aspects when I started the project. This lack of foresight cost me ⌚ time and⚡energy.</p><h4><strong>🪨<em> What were the specific challenges I faced?</em></strong></h4><p>I spent a significant portion of my time refactoring my code, transitioning from a monolithic architecture to a microservices architecture, and switching between different service providers due to their inability to meet the application’s requirements.</p><h4><strong>🧗 <em>How could I have avoided these challenges?</em></strong></h4><p>Instead of tackling the project head on, I should have:</p><ul><li>Taken a step back</li><li>Conducted thorough research on all aspects of the project</li><li>Drafted a detailed document outlining the solution’s architecture</li><li>Listed the project’s functional and non-functional requirements</li></ul><p>Now don’t get me wrong, it’s almost impossible to fully grasp the entire scope of a project when you’re just starting. But it’s crucial to invest sufficient upfront time to understand the problem you are solving, rather than rushing to create solution.</p><p>🥜 In a nutshell: Plan, then execute.</p><h3>⛳ Understanding the Business Side of Tech</h3><p><strong>Do interesting stuff, and build for impact</strong></p><p>I’m lucky to have interned at a startup in the fascinating domain of Agritech. Working with satellite APIs, geospatial data, and learning more about the intersection between agriculture and technology, have made this internship experience all the more intriguing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1ZwBPj1uMjXhbQ63" /><figcaption>Photo by <a href="https://unsplash.com/@dmey503?utm_source=medium&amp;utm_medium=referral">Dan Meyers</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I think as you work in a particular industry, you naturally develop an interest for it. I would have never looked into agritech had I not done this internship, so I think it expanded my perspective of the possible applications of technology.</p><p>Another key takeaway is the importance of effective communication. Asking questions is not a bad thing — it’s better to clarify the problem statement early on, than to realise 2 weeks down the line that you’re not even solving the stated problem 😣.</p><p>Also, focus on <strong>solving problems</strong>, not using ✨<strong>fancy tech</strong>✨. Clients will always prefer a working solution built using age-old tech, rather than a solution that doesn’t even work, but uses the latest tools and frameworks.</p><p>🎯 Be solution-oriented, and focus on catering for the client’s needs.</p><p>Well, that’s the end for this chapter of my life!</p><h4><strong><em>What’s next for me?</em></strong></h4><p>Currently, my goal is to continue improving myself by upskilling and working on personal projects.</p><ul><li>✍️ Continue writing high-quality articles on my journey and AI tech</li><li>🙋‍♂️ Engage even more with the Melbourne tech community, attend a bunch of meetups and meet awesome people</li><li>🚀 Build and deploy my Brain Tumor Analysis project</li><li>🤔 Dive deeper into advanced Machine Learning and MLOps</li><li>👨‍💻 Learn more about design patterns, clean code, and system architecture</li><li>🏅 Achieve the AWS Machine Learning Specialty Certification</li></ul><p>👀 I’m also in the market for <strong>Full-Time Machine Learning Engineer</strong> roles based in Melbourne, or remote/hybrid work.</p><p>Let’s have a chat! Catch me on <a href="https://www.linkedin.com/in/rajpulapakura/">LinkedIn</a>, <a href="https://github.com/raj-pulapakura/">GitHub</a>, and <a href="https://www.youtube.com/@rajpulapakura9119">YouTube</a>.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1896ad469555" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multimodal Models and Fusion - A Complete Guide]]></title>
            <link>https://medium.com/@raj.pulapakura/multimodal-models-and-fusion-a-complete-guide-225ca91f6861?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/225ca91f6861</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[vector-embeddings]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[multimodal-ai]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Tue, 20 Feb 2024 05:12:26 GMT</pubDate>
            <atom:updated>2024-03-06T00:27:36.773Z</atom:updated>
            <content:encoded><![CDATA[<h4>A detailed guide to multimodal models and strategies to implement them</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ag1eUL0hAjGUWnDeQeMhiw.png" /><figcaption>Multimodal fusion— DALL·E</figcaption></figure><h3>Table of Contents</h3><p>· <a href="#7963">1. Humans are Multimodal!</a><br>· <a href="#af4c">2. Multimodal Fusion Case Study: DDSD</a><br>· <a href="#7188">3. Strategies for Fusion</a><br> ∘ <a href="#3915">3.1. Understanding Embeddings</a><br> ∘ <a href="#36e4">3.2. Combining Different Modalities</a><br> ∘ <a href="#b39c">3.3. Early Fusion</a><br> ∘ <a href="#3db5">3.4. Intermediate Fusion</a><br> ∘ <a href="#ea9c">3.5. Late Fusion</a><br>· <a href="#e47a">4. Modality Dropout: Data Scarcity at Inference</a></p><h3>1. Humans are Multimodal!</h3><p>Personally, I learn better when I intake information from multiple sources about a particular subject. For example, if I wanted to learn about the Transformer architecture, here are some of the different sources I would use:</p><ul><li>The official Transformer paper</li><li>A couple of YouTube videos explaining the architecture</li><li>A HuggingFace/TensorFlow/PyTorch tutorial implementing a Transformer</li></ul><p>By taking in multiple sources of information, and multiple types of information (text, video, audio), I am able to better understand the essence of the content. And I’m sure you can relate to this.</p><p>But we’re not just multimodal in the way we learn. The way we interact with fellow human beings is multimodal too. Think back to your last conversation. Not only were you analysing the other person’s voice, but their pitch, tone and body language all contribute to the demeanour of the conversation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xwp0PnP7B1AzF8aR" /><figcaption>Photo by <a href="https://unsplash.com/@brookecagle?utm_source=medium&amp;utm_medium=referral">Brooke Cagle</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>That being said, a machine learning model can also benefit from integrating information from different modalities, giving it a comprehensive view of the subject or task.</p><p>The process of fusing these different modalities so that a model can learn from them, is called <strong>multimodal fusion</strong>. And models which utilize multimodal fusion, are called <strong>multimodal models</strong>.</p><h3>2. Multimodal Fusion Case Study: DDSD</h3><p>Device-directed speech detection (DDSD) is the binary classification task of distinguishing between queries directed at a voice assistant (VA) versus side conversation or background speech¹. It’s how voice assistants can detect when you say “Hey Siri” or “Hey Google”.</p><p>This is quite a challenging task, as the voice assistant has to distinguish between loud background noise and irrelevant conversations to isolate your specific, directed invocation.</p><p>One way to enhance the quality of the trigger word detection model is to utilize both verbal and non-verbal cues. In addition to using verbal cues such as the words that were said, the model can also utilize non-verbal cues, such as <strong>prosodic features</strong> (pitch, intonation, stress and rhythm), and even visual cues if it has access to them.</p><p>For example, we tend to talk louder, slower, over-articulate, and avoid having stops or speech fillers, such as ‘Uh’ and ‘um’, when we issue a command to a VA. In other words, while the acoustic-based DDSD focuses on what was said, prosody-based DDSD focuses on how a query was said to predict device directedness¹.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hfIzvcHkAEDR9KC8" /><figcaption>Photo by <a href="https://unsplash.com/@benceboros?utm_source=medium&amp;utm_medium=referral">BENCE BOROS</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Combining these different modalities of information enables the model to utilize verbal input as well salient non-verbal cues, leading to enhanced trigger word detection.</p><p>We’ll touch on other applications of multimodal fusion throughout the article, but let’s take some time to really understand the fusion process works in an ML system.</p><h3>3. Strategies for Fusion</h3><p>Models can benefit immensely from integrating data from various modalities. But <em>how </em>and <em>when </em>this fusion is performed is crucial to the success of a multimodal model.</p><h4>3.1. Understanding Embeddings</h4><p>Different modalities such as text and images can be processed into a common representation, called an embedding. An embedding is essentially a super-condensed, machine-understandable list of numbers, capturing the essence of the source information.</p><p>Embeddings enable models to reason about different modalities on the same semantic level. For example, an image of a cat wearing sunglasses can be converted into a 16-length embedding. The sentence “this cat is wearing sunglasses” can also be converted into a 16-length embedding. By comparing the embeddings, a trained model can then reason that these two pieces of information are similar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q4s7mFlfc0gBArK0UAIF5Q.png" /><figcaption>Embeddings provide a uniform way for models to understand unstructured data. Image by author.</figcaption></figure><h4>3.2. Combining Different Modalities</h4><p>Now let’s tackle how we can actually <em>combine</em> the information from different modalities to enhance a model’s predictive capabilities.</p><p>There are 4 general strategies for multimodal fusion:</p><ul><li><strong>Early fusion</strong>: Fuse the modalities into a single representation at the input level, and then push the fused representation through a model.</li><li><strong>Intermediate fusion</strong>: Process each modality separately into a latent representation, fuse them, and then process the fused representation.</li><li><strong>Late fusion</strong>: Run each modality through its own model independently, and fuse the outputs (scores) of each modality.</li><li><strong>Hybrid fusion</strong>: Combine early, intermediate, or late fusion.</li></ul><p><strong>Each fusion strategy only differs by <em>when </em>we actually fuse the information from the different modalities in the model pipeline.</strong></p><h4>3.3. Early Fusion</h4><p>Early fusion refers to combining different modalities at the input level.</p><p>The advantage of this strategy is that we don’t have to perform dedicated processing for each modality. We just fuse them all the input level, and process the fused representation through the model.</p><p>One possible application of this is if you have two different sources of the same modality. For example, if you are building a model which predicts positive or negative sentiment of Amazon book reviews, you could utilize the book reviews themselves, and also information about the price, author and genres. A simple text concatenation is enough to consolidate all this information into a single representation, which can then be inputted into the sentiment classification model.</p><p>The downside to this approach is that raw input data may not contain rich semantic information. This means that the model is not able to capture complex interactions between the modalities, limiting the benefit the model can derive from the multimodal fusion.</p><h4>3.4. Intermediate Fusion</h4><p>Intermediate fusion is the most widely used fusion strategy. It involves processing each modality into a latent representation, fusing them, and then doing some final processing to produce the output scores.</p><p>Autonomous vehicles can use intermediate fusion by integrating data from sensors such as cameras, LiDAR, radar, and GPS. These different modalities are cannot be fused directly as in early fusion, but they must each be converted into a latent representation, fused, and then processed further to predict what the vehicle should do next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_E1zbi_-vPNViKaGJwjXxQ.jpeg" /><figcaption>Autonomous vehicles use models that integrate multiple modalities from cameras, LIDAR, radar, and GPS, to predict what the vehicle should do next. Image from <a href="https://waymo.com/waymo-driver/">Waymo</a>.</figcaption></figure><p>The exact process of fusing the latent representations is an implementation detail, but some options include concatenation, element-wise addition, or even attention mechanisms.</p><p>The advantage of intermediate fusion is the model is able to learn rich interactions between each modality because they are first converted into a machine-understandable representation.</p><p>The downside to this approach is that individual processing is required for each modality before they can be fused. This may not be a huge issue because of the availability of pretrained embeddings for images, text and audio, but it adds extra processing time and can impact inference speed.</p><h4>3.5. Late Fusion</h4><p>Late fusion is more closer to an ensemble model. Each modality is processed independently with their own models, and the outputs from these models are then combined at a later stage².</p><p>An example of using late fusion would be a genre classification system for YouTube videos. Given a link to a YouTube video, one model could process the video content itself and output a predicted genre, and another model could process the transcript or description of the video, and output a predicted genre. These two independent predictions can then be aggregated through a weighted average or via another model, to produce the final genre prediction.</p><p>The advantage of late fusion is its simplicity and isolation. Each model gets to learn super rich information on its modality.</p><p>The downside is that system is not able to learn complex modal interactions, and thus does not benefit directly from the complementary information each modality might offer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*9Rrp5WD0y3qqHkHZxRgv1w.png" /><figcaption>Example architecture for intermediate/late multimodal fusion. Image by <a href="https://blog.roboflow.com/multimodal-models/">roboflow</a>.</figcaption></figure><h3>4. Modality Dropout: Data Scarcity at Inference</h3><p>Multitmodal models are powerful because they can integrate various information sources to gain a comprehensive understanding of the subject matter. But training an ML system on multiple modalities also means that all of these modalities must be available at inference time. However, in some situations, this cannot be guaranteed.</p><p>Ideally, we would want to design a system which could integrate all the <em>available </em>modalities, and still function effectively if certain modalities are unavailable.</p><p>One strategy to accomplish this is through <strong>modality dropout</strong>. Modality dropout (or modal dropout) involves randomly dropping or obscuring certain modalities during each training iteration, forcing the model to adapt to varying combinations of modalities.</p><p>This enables the model to effectively utilize the available modalities, so that even if only one of the modalities are available, the model can still produce reasonable predictions.</p><p>The specific implementation of modality dropout is quite nuanced. I found this <a href="https://www.youtube.com/watch?v=cII_ksflzBo">awesome video</a> by <a href="https://www.youtube.com/@ComputerVisionFoundation">ComputerVisionFoundation Videos</a>, where they explained how they used multimodal fusion and modality dropout. They also have some great resources on advanced computer vision topics.</p><p>Thanks for reading!</p><p><strong>👏 If you liked this article, I would really appreciate if you clapped for it, so that more people can discover it and learn something valuable.</strong></p><p>Also, check out these articles which you might like:</p><ul><li><a href="https://medium.com/@raj.pulapakura/image-segmentation-a-beginners-guide-0ede91052db7">Image Segmentation — A Beginner’s Guide</a></li><li><a href="https://medium.com/@raj.pulapakura/beginners-guide-to-the-maths-behind-machine-learning-13e497af2b9c">Beginner’s Guide to the Maths behind Machine Learning</a></li><li><a href="https://medium.com/@raj.pulapakura/vector-databases-a-beginners-guide-723ce809f52b">Vector Databases: A Beginner’s Guide</a></li></ul><p>Follow me for more great content:</p><ul><li>📃 <a href="https://medium.com/@raj.pulapakura">Medium</a></li><li>🌐 <a href="https://www.linkedin.com/in/rajpulapakura/">LinkedIn</a></li><li>📽️ <a href="https://www.youtube.com/@rajpulapakura9119">YouTube</a></li></ul><p>Have a fantastic day!</p><p>[1] Krishna et al., 2023. <a href="https://arxiv.org/pdf/2310.15261.pdf">Modality Dropout for Multimodal Device Directed Speech Detection using Verbal and Non-Verbal Features</a>. arXiv:2310.15261.</p><p>[2] <a href="https://www.educative.io/answers/what-is-multimodal-fusion">https://www.educative.io/answers/what-is-multimodal-fusion</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjJany0lsMVSjKnZYhyJpg.png" /><figcaption>Multimodal models — DALL·E</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=225ca91f6861" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image Segmentation — A Beginner’s Guide]]></title>
            <link>https://medium.com/@raj.pulapakura/image-segmentation-a-beginners-guide-0ede91052db7?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ede91052db7</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[self-driving-cars]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[image-segmentation]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Sun, 04 Feb 2024 15:16:06 GMT</pubDate>
            <atom:updated>2024-02-04T15:16:06.047Z</atom:updated>
            <content:encoded><![CDATA[<h3>Image Segmentation — A Beginner’s Guide</h3><h4>The essentials of Image Segmentation + implementation in TensorFlow</h4><p><strong>Image segmentation </strong>is a <strong>computer vision </strong>technique that assigns a label to every pixel in an image such that pixels with the same label share certain characteristics.</p><p>For example, in a street scene, all pixels belonging to cars might be labeled with one color, while those belonging to the road might be labeled with another.</p><p>But to understand image segmentation and why it is useful, let’s go back to basics….</p><h3>Boring Classifiers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*KesPp8UULeUVdfAMTY7OHA.jpeg" /><figcaption>Cute doggo. <a href="https://wallpapers.com/picture/cute-aesthetic-dog-pictures-0j2hq1086bx59ovv/download">Source</a></figcaption></figure><p>Is there a cute little doggo in this picture? Of course there is.</p><p>This is a classification task. It tells us if there <em>is </em>a dog in the image.</p><p>But what if we want to know exactly <em>where </em>the dog is.</p><p>One approach is to draw a <strong>bounding box</strong> around the dog, which is called <strong>Object Detection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*T1BVOFmI4gL8105tcn8U3A.png" /><figcaption>Cute doggo + bounding box. <a href="https://wallpapers.com/picture/cute-aesthetic-dog-pictures-0j2hq1086bx59ovv/download">Source</a> + Author</figcaption></figure><p><strong>If that’s all you want, then you’re done!</strong> But if you want to know exactly <em>where </em>the dog is, on the <em>pixel level</em>, then you’ll need something better. That’s where image segmentation comes into play.</p><h3>Image Segmentation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLnqts302WGIHaXWJVIf5w.png" /><figcaption>Street segmentation. <a href="https://datagen.tech/guides/image-annotation/image-segmentation/">Source</a></figcaption></figure><p>The core task of image segmentation is to classify each pixel in an image. In the above street scene, there are 5 classes: road (pink), vehicles (red), buildings (yellow), nature (green), sky (blue). Each pixel is assigned one of these classes.</p><p>But sometimes you want to be able to differentiate between different cars, or different trees. To this end, there are 3 main types of image segmentation, each providing a different level of detail and information.</p><h3>Semantic vs. Instance vs. Panoptic</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3Wv5g-UiRomJO9Nn4k-dw.jpeg" /><figcaption>Semantic vs. Instance vs. Panoptic segmentation. <a href="https://labelyourdata.com/articles/semantic-segmentation">Source</a></figcaption></figure><ul><li><strong>Semantic segmentation</strong> classifies each pixel based on its semantic class. All the birds belong to the same class.</li><li><strong>Instance segmentation</strong> assigns unique labels to different instances, even if they are of the same semantic class. Each bird belongs to a different class.</li><li><strong>Panoptic segmentation</strong> combines the two, providing both class-level and instance-level labels. Each bird has its own class, but they are all identified as a “bird”.</li></ul><p>Cool, but how do we actually implement image segmentation?</p><p>There are a couple of ways, such as thresholding and clustering, but deep learning (my fav) really takes the spotlight when it comes to image segmentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Jvrhdz0GlwCrsY5njOB_Tg.gif" /><figcaption>Real-time body part panoptic segmentation. GIF from <a href="https://blog.tensorflow.org/2019/11/updated-bodypix-2.html">TensorFlow Blog</a></figcaption></figure><h3>U-Net</h3><p>The <a href="https://arxiv.org/abs/1505.04597">U-Net</a> architecture was initially designed for medical image segmentation, but it has since been adapted for many other use cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6K-HwS_gmjvOPcoXqejd4w.png" /><figcaption>U-Net. Image by author.</figcaption></figure><p>The U-Net has an <strong>encoder-decoder </strong>structure.</p><p>The <strong>encoder</strong> is used to compress the input image into a latent space representation through convolutions and downsampling.</p><p>The <strong>decoder </strong>is used to extrapolate the latent representation into a segmented image, through convolutions and upsampling.</p><p>The long gray arrows running across the “U” are <strong>skip connections</strong>, and they serve two main purposes:</p><ol><li>During the forward pass, they enable the decoder to access information from the encoder.</li><li>During the backward pass, they act as a “gradient superhighway” for gradients from the decoder to flow to the encoder.</li></ol><p>The output of the model has the same width and height as the input, however the number of channels will be equal to the number of classes we are segmenting.</p><h3>Code it up</h3><p>If you’re keen to code, let’s implement the U-Net architecture for semantic segmentation in TensorFlow.</p><h4>U-Net Architecture</h4><p>Defining the model architecture is rather straightforward.</p><pre>from tensorflow.keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D, <br>concatenate, Conv2DTranspose<br><br>def conv_block(x, n_filters):<br>    &quot;&quot;&quot;two convolutions&quot;&quot;&quot;<br>    x = Conv2D(n_filters, (3, 3), padding=&#39;same&#39;, activation=&#39;relu&#39;)(x)<br>    x = Conv2D(n_filters, (3, 3), padding=&#39;same&#39;, activation=&#39;relu&#39;)(x)<br>    return x<br>    <br>def encoder_block(x, n_filters):<br>    &quot;&quot;&quot;conv block and max pooling&quot;&quot;&quot;<br>    x = conv_block(x, n_filters)<br>    p = MaxPooling2D((2, 2))(x)<br>    return x, p # we will need x for the skip connections later<br><br>def decoder_block(x, p, n_filters):<br>    &quot;&quot;&quot;upsample, skip connection, and conv block&quot;&quot;&quot;<br>    x = Conv2DTranspose(n_filters, (2, 2), strides=(2, 2), padding=&#39;same&#39;)(x)<br>    x = concatenate([x, p]) # concatenate = skip connection<br>    x = conv_block(x, n_filters)<br>    return x<br><br>def unet_model(n_classes, img_height, img_width, img_channels):<br>    inputs = Input((img_height, img_width, img_channels)) # 512x512x3<br>    <br>    # Contraction path, encoder<br>    c1, p1 = encoder_block(inputs, n_filters=64) # c1=512x512x64 p1=256x256x64<br>    c2, p2 = encoder_block(p1, n_filters=128) # c2=256x256x128 p2=128x128x128<br>    c3, p3 = encoder_block(p2, n_filters=256) # c3=128x128x256 p3=64x64x256<br>    c4, p4 = encoder_block(p3, n_filters=512) # c4=64x64x512 p4=32x32x512<br><br>    # Bottleneck<br>    bridge = conv_block(p5, n_filters=1024) # bridge=32x32x1024<br>    <br>    # Expansive path, decoder<br>    u4 = decoder_block(bridge, p4, n_filters=512) # 64x64x512<br>    u3 = decoder_block(u4, p3, n_filters=256) # 128x128x256<br>    u2 = decoder_block(u3, p2, n_filters=128) # 256x256x128<br>    u1 = decoder_block(u2, p1, n_filters=64) # 512x512x64<br><br>    outputs = Conv2D(n_classes, (1, 1), activation=&#39;softmax&#39;)(u1) # 512x512xn_classes<br>    # notice the softmax activation in the final layer<br><br>    model = Model(inputs=[inputs], outputs=[outputs])<br><br>    return model<br><br># example classes: [road, vehicles, buildings, nature, background]<br># instantiate model to predict 5 classes<br>unet_model = multi_unet_model(<br>    n_classes=5, <br>    img_height=IMG_HEIGHT, <br>    img_width=IMG_WIDTH, <br>    img_channels=3<br>)<br># input: 512x512x3<br># output: 512x512x5</pre><h4>Loss Function: Categorical Cross Entropy</h4><p>How do we optimize this model? Well, since image segmentation is really just <strong>classification </strong>on the pixel level, we can use the standard classification loss function, which is <strong>Categorical Cross Entropy</strong>.</p><pre>model.compile(<br>    loss=&quot;categorical_crossentropy&quot;,<br>    categorical_crossentropy<br>)</pre><p>We can interpret each pixel of the resulting (512x512x5) volume as a vector of length 5. Since the last layer uses a <strong>softmax </strong>activation across the last dimension, each pixel vector contains the probabilities of that pixel belonging to each class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6wCtL-e2rYWsrLbMvFNtKg.png" /><figcaption>Intuition for model output</figcaption></figure><p>Before we can train the model, we need a <strong>dataset</strong>. The dataset should contain (image, mask) pairs, where the image (x) is of shape (512x512x3) and the mask (y) is of shape (512x512x5).</p><p>Here is an example ground truth mask:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*VXXTC8g_v46ldWAEQERrfQ.png" /><figcaption>Image by <a href="https://prince-canuma.medium.com/how-to-do-image-segmentation-in-minutes-b49e15fa19f0">Prince Canuma</a></figcaption></figure><p>Each pixel can only belong to one class, so it contains a “1” in one of the class channels, and a “0” in the other channels. You can think of each pixel as a one-hot vector (because that’s what it is).</p><p>Once you have your dataset prepared, you’re ready to train:</p><pre>model.fit(<br>    train_ds,<br>    validation_data=val_ds,<br>    epochs=10,<br>)</pre><p>Of course, this code would not be enough to run a successful model. If you actually want to implement this, you need to consider preprocessing, rescaling, batching etc.</p><p>I’ve prepared a Kaggle notebook which tackles car segmentation (segmenting different parts of a car). It contains the complete code to run an image segmentation model, so check it out <a href="https://www.kaggle.com/code/rajpulapakura/car-segmentation-model-dev/notebook#Segmentation-model">here</a>.</p><h3>Final Notes</h3><ul><li><strong>Class Imbalance</strong>: Often in image segmentation, there is severe class imbalance. For example, in an average street view image, cars and buildings take up a lot of pixels, but stop signs take up very few pixels. The model has less data on stop signs, so it will perform poorly in segmenting stop signs. To solve this, you can use <a href="https://www.youtube.com/watch?v=NqDBvUPD9jg">Focal Categorical Cross Entropy</a><strong> </strong>and class weights<strong>, </strong>which place emphasis on minority classes.</li><li><strong>Other Architectures</strong>: U-Net is not the only image segmentation architecture, although it is conceptually the simplest. Others include <a href="https://arxiv.org/abs/1511.00561">SegNet</a>, <a href="https://arxiv.org/abs/1703.06870">Mask R-CNN</a>, and <a href="https://arxiv.org/abs/1612.01105">PSPNet</a>.</li><li><strong>Binary Segmentation: </strong>If there is only one class your segmenting (e.g. segmenting a brain tumor in an MRI scan), then the output of the model only needs to be (512x512). For the mask, each pixel will contain a “1” if that pixel belongs to a tumor, or “0” if that pixel does not belong to a tumor. Make sure to also change “softmax” to “sigmoid” in the final activation of the model, and use the (Focal) Binary Cross Entropy loss function.</li></ul><p>Thanks for reading!</p><p>Follow me for more great content:</p><ul><li>📃 <a href="https://medium.com/@raj.pulapakura">Medium</a></li><li>🌐 <a href="https://www.linkedin.com/in/rajpulapakura/">LinkedIn</a></li><li>📽️ <a href="https://www.youtube.com/@rajpulapakura9119">YouTube</a></li></ul><p>Articles you might like:</p><ul><li><a href="https://medium.com/@raj.pulapakura/beginners-guide-to-the-maths-behind-machine-learning-13e497af2b9c">Beginner’s Guide to the Maths behind Machine Learning</a></li><li><a href="https://medium.com/@raj.pulapakura/vector-databases-a-beginners-guide-723ce809f52b">Vector Databases: A Beginner’s Guide</a></li></ul><p>Have a fantastic day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ede91052db7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ultimate SaaS Tech Web Stack For Developing Paid Products]]></title>
            <link>https://medium.com/@raj.pulapakura/the-ultimate-saas-tech-web-stack-for-developing-paid-products-1eb9f4c4bec6?source=rss-697417c205cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1eb9f4c4bec6</guid>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Raj Pulapakura]]></dc:creator>
            <pubDate>Mon, 29 Jan 2024 11:50:41 GMT</pubDate>
            <atom:updated>2024-02-25T11:14:40.338Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Tech Stack for Peak Developer Experience</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ky8-79LNv_XP6gDU" /><figcaption>Photo by <a href="https://unsplash.com/@theshubhamdhage?utm_source=medium&amp;utm_medium=referral">Shubham Dhage</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you crave a frictionless developer experience and love using modern developer tools, then the Next.js/TypeScript/Firebase/Stripe/Vercel stack is a <strong>no-brainer</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hfw5rF2bqHTjF8_4PvRjGA.png" /></figure><h3>Web Framework: Next.js</h3><p>If you know and love React, then Next is your best friend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*4CA_a2xXTdWwA0TN-kgXiQ.png" /></figure><p>With <strong>117K</strong> ⭐ on GitHub (as of date of publishing), it’s safe to say that Next.js is the <strong>most popular React </strong><a href="https://react.dev/learn/start-a-new-react-project#production-grade-react-frameworks"><strong>meta-framework</strong></a><strong> </strong>out there.</p><p>Some of its most beloved features include:</p><ul><li>✅ <a href="https://www.heavy.ai/technical-glossary/server-side-rendering">Server Side Rendering (SSR)</a> and <a href="https://www.cloudflare.com/en-gb/learning/performance/static-site-generator/">Static Site Generation (SSG)</a></li><li>✅ Powerful integration with <a href="https://tailwindcss.com/">TailwindCSS</a> and plugins</li><li>✅ Easy-to-use Navigation API</li><li>✅ Frictionless deployment with Vercel (we’ll get back to this)</li></ul><h3>Language: TypeScript</h3><p>If you aren’t developing web apps with TypeScript in 2024, <strong><em>you’re missing out.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70uTEHS9zV0L36pbU4CxSw.png" /></figure><p>TypeScript is a <strong>life-saver</strong> when it comes to avoiding silly yet nasty bugs, and will save you lots of lost braincells when you’re developing complex applications.</p><p>Especially with powerful code-completion tools like GitHub Copilot and native VS Code, coding in TypeScript has become easier than ever.</p><h4>Styles: Tailwind CSS</h4><p>While we’re talking about languages, I thought I’d mention the ultimate CSS framework, <a href="https://tailwindcss.com/">Tailwind CSS</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*SxZWANm7G4jOAQtxPVEc_A.png" /></figure><p>Tailwind CSS is a utility-first CSS framework which fosters rapid and easy development. With pre-built classes for almost any use case imaginable, and an easily extendable API, Tailwind CSS is the web artist’s sidekick. Plus, Next.js makes it super simple to start a project pre-configured with Tailwind CSS!</p><h3>BaaS: Firebase</h3><p>When it comes to high-quality developer experience for setting up backend infrastructure, look no further than <a href="https://firebase.google.com/">Firebase</a> “Backend as a Service”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p9s1q4vtOfPpLNqLSwJeNA.png" /></figure><p>Backed by Google’s GCP (Google Cloud Platform), Firebase is capable of handling complex app requirements including:</p><ul><li>Authentication (including third-party auth)</li><li>Storage, with Firestore Database and Realtime Database</li><li>Cloud Functions</li><li>Analytics</li></ul><p>Firebase acts as the single backend service for all your apps, including web and mobile. Also, Firebase has an easy-to-use <a href="https://firebase.google.com/docs/reference/js">TypeScript/JavaScript SDK</a> for integration with web applications.</p><h3>Payments: Stripe</h3><p>Whenever anyone says “payments” and “internet”, the first company that comes to mind is <a href="https://stripe.com/au">Stripe</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*siOe328hmobKUy5JJoOMxw.png" /></figure><p>Stripe allows you to easily perform one-time payments and recurring subscriptions online with their hosted UIs.</p><p><strong>But, the main reason you should use Stripe in this stack is because of its seamless integration with Firebase.</strong></p><p>Yes, you heard me right. Firebase offers an <a href="https://extensions.dev/extensions/stripe/firestore-stripe-payments">extension</a> which allows you to synchronize your Firebase customers and your Stripe customers. This means your web app only needs to talk to Firebase, and Firebase will automatically handle the payments integration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*Nf_28GUbhTKtWm8JrSRVNQ.png" /><figcaption>Next.js + Firebase + Stripe; <a href="https://youtu.be/xi3F2Zv91UE?si=YwXSQX1wl0fyGTNA">Source</a></figcaption></figure><p>If you want to learn more, check out these amazing tutorials (they both use the Next.js/Firebase/Stripe stack):</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fxi3F2Zv91UE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dxi3F2Zv91UE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fxi3F2Zv91UE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b59408401686e03121def67911f6fb71/href">https://medium.com/media/b59408401686e03121def67911f6fb71/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FP0Udy2Gi7n8%3Fstart%3D902%26feature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DP0Udy2Gi7n8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FP0Udy2Gi7n8%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/92f04eb7854de73c0ca1b48cabf9f353/href">https://medium.com/media/92f04eb7854de73c0ca1b48cabf9f353/href</a></iframe><h3>Deployment: Vercel</h3><p>Vercel is the <strong>connoisseur’s choice</strong> for deploying web applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NOQrRBPX2PVMSVH7GwZnaQ.png" /></figure><p>Not only is it the company behind the Next.js framework, but top companies use Vercel for deploying their web apps. You might have heard of these big names: Notion, Adobe, Nintendo, Under Armour, Perplexity and Scale.</p><p>Vercel automatically syncs to your GitHub repository and starts a new deployment on each new commit, so you don’t have to worry about constantly redeploying your site.</p><h3>The Ultimate SaaS Tech Web Stack For Developing Paid Products</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a_uhpp0cnrLNRXoCF_Ix4Q.png" /><figcaption>The Ultimate SaaS Tech Web Stack For Developing Paid Products</figcaption></figure><p>Thanks for reading!</p><p>Follow me for more great content:</p><ul><li>📃 <a href="https://medium.com/@raj.pulapakura">Medium</a></li><li>🌐 <a href="https://www.linkedin.com/in/rajpulapakura/">LinkedIn</a></li><li>📽️ <a href="https://www.youtube.com/@rajpulapakura9119">YouTube</a></li></ul><p>My previous articles:</p><ul><li><a href="https://medium.com/@raj.pulapakura/fine-tune-your-own-bert-token-classification-model-06b1153fbf56">Fine-tune Your Own BERT Token Classification Model</a></li><li><a href="https://medium.com/@raj.pulapakura/vector-databases-a-beginners-guide-723ce809f52b">Vector Databases: A Beginner’s Guide</a></li></ul><p>Have a fantastic day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1eb9f4c4bec6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>