<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Feature Detection | Saikiran Juttu | Robotics Portfolio</title><link>https://juttu-s.github.io/saikiran_juttu.github.io/tags/feature-detection/</link><atom:link href="https://juttu-s.github.io/saikiran_juttu.github.io/tags/feature-detection/index.xml" rel="self" type="application/rss+xml"/><description>Feature Detection</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Mon, 15 Apr 2024 00:00:00 +0000</lastBuildDate><image><url>https://juttu-s.github.io/saikiran_juttu.github.io/media/icon_hu7729264130191091259.png</url><title>Feature Detection</title><link>https://juttu-s.github.io/saikiran_juttu.github.io/tags/feature-detection/</link></image><item><title>Automated Insect Leg Labeling using DeepLabCut</title><link>https://juttu-s.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/</link><pubDate>Mon, 15 Apr 2024 00:00:00 +0000</pubDate><guid>https://juttu-s.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/</guid><description>&lt;p>This project proposes a robust and scalable method for automating insect leg labeling using &lt;strong>image processing, feature detection, and clustering&lt;/strong>, enabling seamless integration with &lt;strong>DeepLabCut&lt;/strong> for behavioral analysis.&lt;/p>
&lt;hr>
&lt;h2 id="methodology-overview">Methodology Overview&lt;/h2>
&lt;h3 id="1-data-collection">1. Data Collection&lt;/h3>
&lt;ul>
&lt;li>Captured insect locomotion data using a &lt;strong>ServoSphere&lt;/strong> robot equipped with omni-wheels and a high-speed camera.&lt;/li>
&lt;li>The camera tracked an insect (ant) placed atop the rotating sphere.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="2-preprocessing-pipeline">2. Preprocessing Pipeline&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Grayscale conversion&lt;/strong> and &lt;strong>Gaussian blur&lt;/strong> for noise reduction&lt;/li>
&lt;li>&lt;strong>Canny Edge Detection&lt;/strong> for edge enhancement&lt;/li>
&lt;li>&lt;strong>Binary thresholding&lt;/strong> and &lt;strong>morphological operations&lt;/strong> for skeletonization&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Canny Edge Result" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/canny_hu11275747406885085122.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/canny_hu15745542599272552929.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/canny_hu3473078471050911037.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/canny_hu11275747406885085122.webp"
width="555"
height="350"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Output after applying Canny edge detection.&lt;/em>&lt;/p>
&lt;hr>
&lt;h3 id="3-feature-extraction">3. Feature Extraction&lt;/h3>
&lt;ul>
&lt;li>Applied &lt;strong>Shi-Tomasi Corner Detection&lt;/strong> on Canny edges for precise joint detection&lt;/li>
&lt;li>Robust to noise and sensitive to detailed motion features&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Shi-Tomasi Detection" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/shi_tomasi_hu3655572418342755069.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/shi_tomasi_hu14103565545081466617.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/shi_tomasi_hu4890327641649225453.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/shi_tomasi_hu3655572418342755069.webp"
width="555"
height="350"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Shi-Tomasi corner detection highlights potential joint features.&lt;/em>&lt;/p>
&lt;hr>
&lt;h3 id="4-body-removal">4. Body Removal&lt;/h3>
&lt;ul>
&lt;li>Used &lt;strong>Zhang-Suen thinning&lt;/strong> for skeleton extraction&lt;/li>
&lt;li>Applied &lt;strong>connected component labeling&lt;/strong> to segment body parts&lt;/li>
&lt;li>Removed body via &lt;strong>template matching&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Skeleton Extraction" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/skeleton_extraction_hu7723478630954022702.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/skeleton_extraction_hu1654188756838549732.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/skeleton_extraction_hu4799263873215453537.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/skeleton_extraction_hu7723478630954022702.webp"
width="553"
height="355"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Skeleton representation using Zhang-Suen thinning.&lt;/em>&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Connected Components" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/connected_components_hu7217986797033856015.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/connected_components_hu12195037151038958192.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/connected_components_hu4918036970471170597.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/connected_components_hu7217986797033856015.webp"
width="545"
height="378"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Connected component labeling for body part isolation.&lt;/em>&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Body Template" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/template_hu11659726123555705027.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/template_hu18209107862982516437.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/template_hu2884419823242467532.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/template_hu11659726123555705027.webp"
width="499"
height="353"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Template matching used to isolate and remove the body region.&lt;/em>&lt;/p>
&lt;hr>
&lt;h3 id="5-leg-detection">5. Leg Detection&lt;/h3>
&lt;ul>
&lt;li>Remaining features correspond to legs&lt;/li>
&lt;li>Calculated angles of features w.r.t. body centroid&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Detected Leg Features" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/leg_features_hu7341448728120080587.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/leg_features_hu18101909398949920466.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/leg_features_hu14108854493791996505.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/leg_features_hu7341448728120080587.webp"
width="489"
height="320"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Extracted leg features post body removal.&lt;/em>&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Feature Angles" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/angles_hu911305775039293742.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/angles_hu16264059692635278634.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/angles_hu12389778951175088630.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/angles_hu911305775039293742.webp"
width="496"
height="338"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Angle estimation of each leg with respect to the centroid.&lt;/em>&lt;/p>
&lt;hr>
&lt;h3 id="6-clustering--tip-detection">6. Clustering &amp;amp; Tip Detection&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>KMeans (K=6)&lt;/strong> clusters features into 6 legs&lt;/li>
&lt;li>Furthest feature in each cluster = leg tip&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="KMeans Clustering" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/kmeans_hu2991777993052901984.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/kmeans_hu1537055730035741828.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/kmeans_hu8003083638116927705.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/kmeans_hu2991777993052901984.webp"
width="556"
height="406"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: KMeans clustering of features into 6 leg regions.&lt;/em>&lt;/p>
&lt;hr>
&lt;h3 id="7-integration-with-deeplabcut">7. Integration with DeepLabCut&lt;/h3>
&lt;ul>
&lt;li>Created &lt;code>.h5&lt;/code> files with clustered keypoints&lt;/li>
&lt;li>Trained DeepLabCut on auto-labeled dataset&lt;/li>
&lt;li>Achieved performance near manual labeling&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="DLC Integration" srcset="
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/integration_hu13320621738235640093.webp 400w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/integration_hu5511305675759056958.webp 760w,
/saikiran_juttu.github.io/project/automated-insect-leg-labeling/integration_hu10805202269737531730.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/automated-insect-leg-labeling/integration_hu13320621738235640093.webp"
width="671"
height="615"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;em>Figure: Final annotated labels used with DeepLabCut.&lt;/em>&lt;/p>
&lt;hr>
&lt;h2 id="experimental-results">Experimental Results&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Leg&lt;/th>
&lt;th>TP (Auto)&lt;/th>
&lt;th>FP (Auto)&lt;/th>
&lt;th>TP (Manual)&lt;/th>
&lt;th>FP (Manual)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>95&lt;/td>
&lt;td>2&lt;/td>
&lt;td>98&lt;/td>
&lt;td>1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>90&lt;/td>
&lt;td>3&lt;/td>
&lt;td>95&lt;/td>
&lt;td>2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>85&lt;/td>
&lt;td>4&lt;/td>
&lt;td>90&lt;/td>
&lt;td>2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td>80&lt;/td>
&lt;td>3&lt;/td>
&lt;td>85&lt;/td>
&lt;td>3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>5&lt;/td>
&lt;td>75&lt;/td>
&lt;td>5&lt;/td>
&lt;td>80&lt;/td>
&lt;td>4&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>6&lt;/td>
&lt;td>70&lt;/td>
&lt;td>3&lt;/td>
&lt;td>75&lt;/td>
&lt;td>3&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>&lt;em>Confusion matrix comparing auto-labeled vs manually labeled results. Accuracy slightly lower, but performance is consistent and scalable.&lt;/em>&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;h2 id="key-techniques">Key Techniques&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Canny Edge Detection&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Shi-Tomasi GFTT&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Template Matching&lt;/strong>&lt;/li>
&lt;li>&lt;strong>KMeans Clustering&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Zhang-Suen Thinning&lt;/strong>&lt;/li>
&lt;li>&lt;strong>DeepLabCut integration&lt;/strong>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="insights--future-work">Insights &amp;amp; Future Work&lt;/h2>
&lt;ul>
&lt;li>Automation significantly reduced manual effort&lt;/li>
&lt;li>High reproducibility across ant datasets&lt;/li>
&lt;li>KMeans produced sharper clusters than Ensemble KMeans&lt;/li>
&lt;li>Future work may explore deep learning-based leg segmentation and adaptive clustering strategies&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="resources">Resources&lt;/h2>
&lt;ul>
&lt;li>📄 &lt;a href="report.pdf">Project Report (PDF)&lt;/a>&lt;/li>
&lt;li>🔗 &lt;a href="https://github.com/juttu-s/Pattern-Recognition-and-Computer-Vision/tree/main/Automated%20Insect%20Leg%20Labeling" target="_blank" rel="noopener">GitHub Repository&lt;/a>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>This approach provides a &lt;strong>generalizable and scalable method&lt;/strong> for anatomical labeling in biological research and can be extended to other multi-limbed species or anatomical joints.&lt;/p></description></item></channel></rss>