<?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: The Coding Dino</title>
    <description>The latest articles on DEV Community by The Coding Dino (@thecodingdino).</description>
    <link>https://dev.to/thecodingdino</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F408841%2F805bed99-6052-4dab-ae21-b25956159a48.jpeg</url>
      <title>DEV Community: The Coding Dino</title>
      <link>https://dev.to/thecodingdino</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thecodingdino"/>
    <language>en</language>
    <item>
      <title>Clothing Style Detection &amp; Recommendation System: Object Detection Model</title>
      <dc:creator>The Coding Dino</dc:creator>
      <pubDate>Thu, 18 Jun 2020 19:34:43 +0000</pubDate>
      <link>https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-object-detection-model-16ca</link>
      <guid>https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-object-detection-model-16ca</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-introduction-1cj4"&gt;Introduction&lt;/a&gt;, &lt;a href="https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-dataset-construction-3e6p"&gt;Dataset Construction&lt;/a&gt; for the detection system can be found in previous posts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction to You Only Look Once (YOLO)
&lt;/h3&gt;

&lt;p&gt;YOLO is an object detection model consisting of a single convolutional network. It uses the complete image to make bounding box and object class predictions unlike other detectors which select regions in the image to predict the presence of objects in it.&lt;br&gt;
The high-level detection procedure of YOLO can be seen below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pHj2SdyJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9n53janen2zus5wumkwq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pHj2SdyJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9n53janen2zus5wumkwq.png" alt="Detection Process of YOLO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Due to its architecture, YOLO can quickly detect objects with decent accuracy. YOLOv3 is the third iteration of the original YOLO model, where the creator updated its architecture to enhance accuracy levels. As compared to other object detection models such as Faster R-CNN and SSD, we found YOLO best suited for our purposes and selected it as the detection model in our system.&lt;/p&gt;

&lt;p&gt;The original source code for all YOLO versions, written in C, is&lt;br&gt;
available in the &lt;a href="https://github.com/&amp;lt;br&amp;gt;%0Apjreddie/darknet,"&gt;DarkNet Repository&lt;/a&gt;. As building the detection&lt;br&gt;
model requires multiple custom model elements for training and prediction, we referred to &lt;a href="https://github.com/experiencor/keras-yolo3"&gt;Experiencor's Github&lt;/a&gt; for scripts to enable us to train the model with our dataset. &lt;/p&gt;

&lt;h3&gt;
  
  
  Implementation
&lt;/h3&gt;

&lt;p&gt;For performing transfer learning, we obtained weights of a YOLOv3 model initially trained on the COCO Dataset, from the &lt;a href="https://pjreddie.com/darknet/yolo/"&gt;official YOLO webpage&lt;/a&gt;. COCO Dataset contains more than 1.5 million object instances distributed across 80 classes. The obtained weights are a result of extensive training and benefit us by increasing accuracy of our model and reducing training time.&lt;/p&gt;

&lt;p&gt;Eighty percent of the dataset was used for training a model built using the obtained pre-trained weights. The training continued until the loss values did not improve by a minimum threshold after a set number of epochs. This was done to ensure the model does not overfit on the data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Further Work
&lt;/h3&gt;

&lt;p&gt;The style and bounding box predictions made by the trained&lt;br&gt;
model will be provided as input to a recommendation system.&lt;br&gt;
On the basis of the bounding box, the recommendation system will&lt;br&gt;
identify the required section of the image, where the clothing item is present, and recommend similar items from the dataset. The high-level implementation design can be seen below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K8DuVatp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ggbdo3yd2qffrn00po1o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K8DuVatp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ggbdo3yd2qffrn00po1o.png" alt="Overview of complete detection &amp;amp; recommendation system"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For further information on what transfer learning is, please refer here: &lt;a href="https://blogs.nvidia.com/blog/2019/02/07/what-is-transfer-learning/"&gt;https://blogs.nvidia.com/blog/2019/02/07/what-is-transfer-learning/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>objectdetection</category>
      <category>transferlearning</category>
      <category>yolo</category>
    </item>
    <item>
      <title>Clothing Style Detection &amp; Recommendation System: Dataset Construction</title>
      <dc:creator>The Coding Dino</dc:creator>
      <pubDate>Mon, 15 Jun 2020 17:56:42 +0000</pubDate>
      <link>https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-dataset-construction-3e6p</link>
      <guid>https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-dataset-construction-3e6p</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-introduction-1cj4"&gt;Introduction&lt;/a&gt; for the complete detection and recommendation system. In this post, I will talk about the dataset used to train the object detection model.&lt;/p&gt;

&lt;p&gt;A majority of the available datasets distinguished clothing items on the basis of their category such as T-Shirt, Jeans, Dress etc., and not on the basis of occasion wear. Also, they mostly contained Western clothing items. Since we were unable to find a dataset containing Indian clothing items, we decided to construct a custom dataset which categorized clothes according to Occasion Wear.  &lt;/p&gt;

&lt;p&gt;The dataset contained 6864 clothing instances and was approximately equally distributed over the following five clothing styles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comfort Wear&lt;/li&gt;
&lt;li&gt;Street Wear&lt;/li&gt;
&lt;li&gt;Office Wear&lt;/li&gt;
&lt;li&gt;Party Wear&lt;/li&gt;
&lt;li&gt;Ethnic Wear&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the Ethnic Wear subset, we collected images of Indian clothes such as Sari, Kurta, Pyjama etc., from the Internet and manually labelled them using labelImg software. For the remaining categories, we modified subsets of DeepFashion dataset and labelled them according to the above clothing styles using labelImg.&lt;/p&gt;

&lt;p&gt;labelImg is a graphical annotation tool and can be found here: &lt;a href="https://github.com/tzutalin/labelImg"&gt;https://github.com/tzutalin/labelImg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Further information on DeepFashion dataset available here: &lt;a href="https://liuziwei7.github.io/projects/DeepFashion.html"&gt;https://liuziwei7.github.io/projects/DeepFashion.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>objectdetection</category>
      <category>imagelabelling</category>
      <category>dataset</category>
    </item>
    <item>
      <title>Clothing Style Detection &amp; Recommendation System: Introduction</title>
      <dc:creator>The Coding Dino</dc:creator>
      <pubDate>Sun, 14 Jun 2020 18:32:12 +0000</pubDate>
      <link>https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-introduction-1cj4</link>
      <guid>https://dev.to/thecodingdino/clothing-style-detection-recommendation-system-introduction-1cj4</guid>
      <description>&lt;p&gt;E-commerce is growing rapidly across the world. The major advantage that e-commerce websites have over retail stores is the abundance of user data, which can be used to make recommendations for the user. Retail stores need to gain a better understanding of their users. &lt;/p&gt;

&lt;p&gt;As a solution to this problem faced by retailers, our team aimed to build a basic system that uses object detection to identify the clothing style worn by the customer. Clothing recognition can be used for smart customer analysis and for building their clothing profile. Once the clothing style has been identified, the system can suggest similar products from the store's database.&lt;/p&gt;

&lt;p&gt;The solution implemented uses occasion wear to distinguish between various clothing styles. We use transfer learning to train an object detection model to identify clothing items in the input image and predict its style. This information is then passed onto a recommendation system that recommends similar clothing items on the basis of the predicted style.&lt;/p&gt;

&lt;p&gt;In this series, I will go into the details of building this system. The complete detection and recommendation system was developed with &lt;a class="comment-mentioned-user" href="https://dev.to/gauravaidasani"&gt;@gauravaidasani&lt;/a&gt;
, where I mostly focused on the style detection part, and hence it will be mostly focused on my contribution.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>objectdetection</category>
      <category>transferlearning</category>
    </item>
    <item>
      <title>Clustering Algorithms: K-Means </title>
      <dc:creator>The Coding Dino</dc:creator>
      <pubDate>Sun, 14 Jun 2020 17:48:53 +0000</pubDate>
      <link>https://dev.to/thecodingdino/clustering-algorithms-k-means-3onc</link>
      <guid>https://dev.to/thecodingdino/clustering-algorithms-k-means-3onc</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;K-Means is an unsupervised machine learning algorithm. The algorithm divides the data points into k groups (called clusters), where each data point can belong to only one cluster. K-Means aims to group together similar data points into the same cluster, while keeping different clusters as far apart as possible. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RDv5dOpQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4ubbljs0a4fyogifxuyf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RDv5dOpQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4ubbljs0a4fyogifxuyf.png" alt="Working of K-Means Algorithm" title="Working of K Means Algorithm"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each cluster has a center, which is a data point that represents the center of the cluster. A data point gets added to a cluster whose center is closest to that data point. Distance between points is measured using sum of squared distances method.&lt;/p&gt;

&lt;h3&gt;
  
  
  Algorithm
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Select the number of clusters, k&lt;/li&gt;
&lt;li&gt;Appoint k data points as cluster centers (either random assignment, or space them as far apart as possible)&lt;/li&gt;
&lt;li&gt; Until cluster assignments do not change, do the following for each data point:

&lt;ol&gt;
&lt;li&gt;Calculate the sum of squared distance between it and all the cluster centers.&lt;/li&gt;
&lt;li&gt;Assign the point to the cluster having the closest center.&lt;/li&gt;
&lt;li&gt;Recalculate the center for clusters by taking the average of all data points assigned to that cluster.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Additional Information
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;K-Means clustering is highly sensitive to the initially chosen cluster centers. Hence, K-means can be run with different starting cluster centers to get optimum results.&lt;/li&gt;
&lt;li&gt;If you do not know the optimum number of clusters to divide the data, try the algorithm with different values of k and select the best k for which the data gets nicely grouped together.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For further information, please checkout &lt;a href="https://stanford.edu/%7Ecpiech/cs221/handouts/kmeans.html"&gt;https://stanford.edu/~cpiech/cs221/handouts/kmeans.html&lt;/a&gt; (image taken from here)&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
    </item>
  </channel>
</rss>
