Skip to content

BTP project for automating the tedious process of yarn-cross section analysis using ML. Will be implementing various algorithm (CNN, ANN etc..) to see what works best. This also has a python program for enable user to draw images, used as database for algorithm.

Notifications You must be signed in to change notification settings

Im-Himanshu/Yarn-Cross-Section-Image-Processing-CNN

Repository files navigation

Yarn Image cross-section Analysis

Introduction

Before getting started into the actual project here is an hypothetical situation to understand the world of textile. I will discuss very briefly about shape of fibers and how it affects fiber's physical property.

About Fibers and Yarns

As shown in the image below, fibers are used to make yarn, yarns are used to make up fabric. img_2.png

Many physical properties of the fabric like texture, warmth, water-retention, etc. depends on the kind of fibre used in making the yarn and then fabric. Different fibres has different shape and hence different property like, As shown in image, cotton, a natural fibre, tends to have convulated strand which gives it the rough texture, polyester, a man made fiber has circular shape and have smooth and shinny texture. Images below shows different type of cross-section for different type of fibers.

img_3.png These property also comes from their inherent molecular structure and physical appearance of it. One very prominent example of this is hollow fibers, used in most of the blankets and pillows. The most important property of these fibers is their remarkable thermal insulation property, which is resulted from the air trapped inside the hollow structure and as we know air is a great insulator of heat.
img_4.png

About Blended Yarn

Now, lets take a hypothetical problem, we want to design a new kind of fabric, this need to have cotton like texture but should be quick-dry like polyester cloths. How do we go about creating such a fabric? Let me answer, we do this by using a blended yarn. You may ask, what the hack is Blended yarn? Let me Explain.
Imagine a yarn like a big circle in which small circular strands of small circle (i.e. fibers) are kept. As shown in image below with grey and black circle. In very crude terms fiber on the outside will decide how the texture of fabric would be, while the fiber on the inside making the bulk would decide its other property. Now, let's come back to our original case, we want texture of cotton, so we would use cotton fibers on outer circle. We want the fabric to also dry-quickly, a property of hydro-phobic polyester fiber, so we will use polyester in the core (i.e Grey circle). And Eureka!!! our recipe for the hypothetical Fabric is ready!!! Congratulations, on just inventing a first of kind its fabric. Now We will send it for manufacturing.

Image 5 Image 6 Image 7

More Trouble

Small update, manufacturer has told us to go to sheep-yard, he can't manufacture such a yarn. It's not technically and mechanically fissible to create the given distribution of fiber. So we have decided to put our years of textile innovator mind-set into action and take things into our own hand. We directly landed into textile research lab, started our yarn spinning machine, change some parameter and feed supply into this gigantic machine and created a yarn ourselves. We cut the yarn cross-section, took 10-15 samples put it under microscope and observe what we have created. Below is what we observed. Now we need to analyze and report density of both fibers. Images-3, Oopsie!! this is not what we desired.

Image 5 Image 6 Image 7
Still we went on to see how the density of different fiber is varying when we move radially outwards in concentric circles. polyester-density = (white_area in ring/total_area of ring), based on which we plotted density at different radius values and plotted the graph shown above. After a year of hard work and multiple experimentation we have got the exact method by which industry can produce our specially designed yarn.

img_13.png

Problem Statement

In the above example, after getting images from microscope, we have to manually mark every pixel with different color for each type of the fiber and then do the radial density analysis manually. To put salt on the wound, we also have to do this process multiple time, for each yarn experiment, to be sure that is in not an anomalous observation. This marking of image and radial density calculation can be easily automated using the Computer-vision techniques.

Solution.

YarnCrossectionImageProcessing

This project has the code for creating a draw board using python on which user can draw some images, which are then saved and used in final training model.

This project uses CNN for training over 10,000 images of yarn cross-section to predict the type of the fiber and the radial density of the fibers along the radius.

This task which has been done manually could be eaisly automated also expeidting the process of analyzing the different yarn type for their different property.

The final result of the algorithm predict with >95% accuracy the type of fiber in a blended yarn. for a demo go here : https://www.youtube.com/watch?v=I1HGaojYO10

img_9 img_11 img_12

About

BTP project for automating the tedious process of yarn-cross section analysis using ML. Will be implementing various algorithm (CNN, ANN etc..) to see what works best. This also has a python program for enable user to draw images, used as database for algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published