3
$\begingroup$

I want to train ResNet50 model using resistor images like below: enter image description here

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?

$\endgroup$
3
$\begingroup$

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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Nahavt Jul 3 at 20:32
  • $\begingroup$ How many images do you have? $\endgroup$ – Simon Alford Jul 3 at 23:32
  • $\begingroup$ 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 $\endgroup$ – Nahavt Jul 4 at 7:50
  • 3
    $\begingroup$ 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 $\endgroup$ – Brale Jul 4 at 9:30
  • $\begingroup$ Oh OK thank you a lot. Then I will try it. $\endgroup$ – Nahavt Jul 4 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.