Answers.Body: <p>Yes it should be possible. You may have a bug in your code, or the wrong hyperparameters. Training ResNet-50 will take a long time. Try training on other sets of images and see what accuracy you get to check if your approach is correct. Or, try loading a pretrained model, and training from that.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-03T20:32:05.970Z
Answers.Text: Thank you a lot for your answer. I was really worried about If it is due lack of images but now I will put effort on it.
Answers.UserDisplayName: Nabla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-03T23:32:32.977Z
Answers.Text: How many images do you have?
Answers.UserDisplayName: Simon Alford
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-04T07:50:08.923Z
Answers.Text: I do not remember the exact numbers but as I remember It was around 3 per class and I have augmented it to around 100 per class by data augmentation. I know that this data is quite low to train a model. That is why I asked for If it is due low data (Because I thought maybe those color coded lines are just too small to be categorized because they are all in same shape -resistors-) If so I will start to collect data myself to train it because there are very few data online for resistors
Answers.UserDisplayName: Nabla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-04T09:30:42.003Z
Answers.Text: You don't need ResNet-50 to learn resistors. They always look the same, a small convolutional network will suffice. You probably don't even need deep learning you could use do some kind of color thresholding and see how the colors are ordered or something like that
Answers.UserDisplayName: Brale
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-03T19:34:08.647Z
Answers.LastActivityDate: 2020-07-03T19:34:08.647Z
Answers.UserDisplayName: Simon Alford
Body: <p>I want to train ResNet50 model using resistor images like below:
  <a href="https://i.sstatic.net/dFRVt.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dFRVt.jpg" alt="enter image description here" /></a></p>
  <p>I tried it by collecting data from google images and there were quite few. So accuracy was very low (around %10) but I wonder If it is due lack of images or is it really possible to classify these images? Because as it is seen the object to be classified is very small and its value as color coded. I thought maybe this is not a good idea. Searched it on google but could not find anybody tried to do it before. I have also tried data augmentation and changing to other models but still its accuracy was quite low.</p>
  <p>P.S: I have also tried changin epoch numbers, optimizers and all other parameters. So I want to make sure If it is due low data or is it just very hard task to complete for a computer vision model.</p>
  <p>And Is it rational to crop the image by using a mask before classifying it to make sure all color codes are bigger and easily valuable by model?</p>
  
Tags: <deep-learning><classification><computer-vision><datasets><categorical-data>
Title: Is it possible to classify resistors using ResNet50?
UserDisplayName: Nabla
ThreadText: # Is it possible to classify resistors using ResNet50?
  
  (Asked by: username_0 on 2020-07-03)
  
  I want to train ResNet50 model using resistor images like below:
  [![enter image description here](https://i.sstatic.net/dFRVt.jpg)](https://i.sstatic.net/dFRVt.jpg)
  
  I tried it by collecting data from google images and there were quite few. So accuracy was very low (around %10) but I wonder If it is due lack of images or is it really possible to classify these images? Because as it is seen the object to be classified is very small and its value as color coded. I thought maybe this is not a good idea. Searched it on google but could not find anybody tried to do it before. I have also tried data augmentation and changing to other models but still its accuracy was quite low.
  
  P.S: I have also tried changin epoch numbers, optimizers and all other parameters. So I want to make sure If it is due low data or is it just very hard task to complete for a computer vision model.
  
  And Is it rational to crop the image by using a mask before classifying it to make sure all color codes are bigger and easily valuable by model?
  
  **Tags:** deep-learning, classification, computer-vision, datasets, categorical-data
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-07-03. Score: 3 | Accepted answer
  
  Yes it should be possible. You may have a bug in your code, or the wrong hyperparameters. Training ResNet-50 will take a long time. Try training on other sets of images and see what accuracy you get to check if your approach is correct. Or, try loading a pretrained model, and training from that.
  
  > **Comments:**
  > **username_0**: Thank you a lot for your answer. I was really worried about If it is due lack of images but now I will put effort on it.  
  > **username_1**: How many images do you have?  
  > **username_0**: I do not remember the exact numbers but as I remember It was around 3 per class and I have augmented it to around 100 per class by data augmentation. I know that this data is quite low to train a model. That is why I asked for If it is due low data (Because I thought maybe those color coded lines are just too small to be categorized because they are all in same shape -resistors-) If so I will start to collect data myself to train it because there are very few data online for resistors  
  > **username_2**: You don't need ResNet-50 to learn resistors. They always look the same, a small convolutional network will suffice. You probably don't even need deep learning you could use do some kind of color thresholding and see how the colors are ordered or something like that  
  
  ---
  
  