<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prachi Bisht</title>
    <description>The latest articles on DEV Community by Prachi Bisht (@prachi_bisht_405312ff3d9e).</description>
    <link>https://dev.to/prachi_bisht_405312ff3d9e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2892973%2Fa248d0d1-c8c0-4c5b-9cb6-c0f5e1eaad2d.png</url>
      <title>DEV Community: Prachi Bisht</title>
      <link>https://dev.to/prachi_bisht_405312ff3d9e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prachi_bisht_405312ff3d9e"/>
    <language>en</language>
    <item>
      <title>Fine Tuning Swin Transformer for PlantNet Classification</title>
      <dc:creator>Prachi Bisht</dc:creator>
      <pubDate>Fri, 21 Feb 2025 16:48:49 +0000</pubDate>
      <link>https://dev.to/prachi_bisht_405312ff3d9e/fine-tuning-swin-transformer-on-plantnet-dataset-afd</link>
      <guid>https://dev.to/prachi_bisht_405312ff3d9e/fine-tuning-swin-transformer-on-plantnet-dataset-afd</guid>
      <description>&lt;p&gt;Hello everyone,&lt;/p&gt;

&lt;p&gt;I’m excited to share that I’ve recently wrapped up a project for &lt;a href="https://www.superteams.ai/" rel="noopener noreferrer"&gt;Superteams.ai&lt;/a&gt;, where I fine-tuned a Swin Transformer model on the PlantNet dataset for plant species recognition. I’ve detailed the entire journey on Medium, but I wanted to give you all a quick rundown right here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Objective:&lt;/strong&gt;&lt;br&gt;
My goal was to explore the capabilities of the Swin Transformer—a state-of-the-art vision transformer—by adapting it to the challenging domain of plant recognition. Using the PlantNet dataset, which features a wide variety of plant images under different conditions, I aimed to improve classification accuracy through meticulous fine-tuning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why the Swin Transformer?&lt;/strong&gt;&lt;br&gt;
The Swin Transformer stands out due to its hierarchical architecture and the innovative shifted window approach. This design not only captures local features but also maintains a global context, making it ideal for handling the subtle nuances present in plant imagery.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;The PlantNet Dataset:&lt;/strong&gt;&lt;br&gt;
The dataset offered a rich and diverse collection of plant images. While this diversity is a boon for model training, it also introduces challenges like class imbalance and varying image quality. Addressing these issues required thoughtful data preprocessing and augmentation strategies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methodology
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data Preparation:&lt;/strong&gt;&lt;br&gt;
I began by cleaning and augmenting the dataset to ensure robust training. Techniques such as random cropping, flipping, and color jitter were key to simulating real-world variations in plant images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fine-Tuning Process:&lt;/strong&gt;&lt;br&gt;
Leveraging transfer learning, I started with a pre-trained Swin Transformer and fine-tuned it on the PlantNet dataset. I experimented with different learning rates and batch sizes, and implemented early stopping to prevent overfitting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evaluation:&lt;/strong&gt;&lt;br&gt;
The model was evaluated using metrics like accuracy, precision, and recall. The fine-tuning led to a significant boost in performance compared to baseline models, showcasing the Swin Transformer's potential in this specialized domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges &amp;amp; Learnings:&lt;/strong&gt;&lt;br&gt;
One major hurdle was handling the inherent variability in the PlantNet images. This project deepened my appreciation for the importance of data augmentation and fine-tuning strategies when applying transformer architectures to domain-specific tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Results:&lt;/strong&gt;&lt;br&gt;
The fine-tuned model achieved promising results, effectively handling the diverse conditions presented by the PlantNet dataset.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1v28bn28kuv2uixg4wt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1v28bn28kuv2uixg4wt.png" alt="Image description" width="599" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Dive Deeper on Medium
&lt;/h2&gt;

&lt;p&gt;For a more in-depth look at the project—including detailed code snippets, a comprehensive data analysis, and a thorough discussion of the challenges and solutions—check out my full article on Medium: &lt;a href="https://medium.com/@bishtprachi2003/fine-tuned-swin-transformer-for-plant-classification-25b674478f98" rel="noopener noreferrer"&gt;Read the full article on Medium.&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
Thank you for taking the time to read about my project. I’m eager to hear your feedback and suggestions for future improvements. Let’s keep the conversation going!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding!&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
