I have a piece of custom device that displays its working status by blinking LEDs fitted on the device. for example, the led is ON means the board is on led is OFF means the board is off. red led means error, green means all ok and so on.

I want to detect the color of LED shown by a custom device using a CNN network.

How do I prepare a dataset to achieve status LED Light color detection which is shown by a custom device?

Note: I will be using C++ and Caffe and also I cant use simple image processing because of limitations from the camera hardware .


First of all, I do not think you need a DNN if task is as simple as you are describing it. There will be lot of digital image processing solutions or maybe check opencv-python (cv2). But, if you are particularly interested in DNN, I would suggest starting with Keras. According to me it should not be too tough to perform this task as CNN can do complex jobs than this one.

On the data arrangement part, you may have multiple pictures of various states of your device and annotate data manually. A working system can take pictures at some interval and detect the state.

I hope this helps :)

  • $\begingroup$ Thanks, I am better off using C++ and Caffe. And I cant use simple image processing due to some hardware limitations. But can you please elaborate some more on the data set preparation part? Should I take pictures of different LED status and label each of them ..It may take a long time to prepare such a dataset manually, given that pictures have to be collected at different lighting conditions. $\endgroup$ – sroy Jan 29 at 4:01
  • $\begingroup$ From my experience, dataset preparation is the most sensitive part of a model's performance. Sometimes, it is possible to get a general dataset and train your model on it, later you can fine-tune it with your dataset which is smaller in size. But, I have seen people spending lot of effort in manually preparing the data. It totally depends on what is your motive if you are building a production level solution or doing a school project :) $\endgroup$ – Zeel B Patel Jan 29 at 7:09
  • $\begingroup$ I see, there is no shortcut to it :) $\endgroup$ – sroy Jan 29 at 10:11
  • $\begingroup$ Yes, you are right but try out if fine-tuning is possible, I am not sure if you would be able to do it in C++ and Caffe. If you liked the conversation, can you upvote and accept my answer, I need a reputation for future conversations here :) $\endgroup$ – Zeel B Patel Jan 29 at 11:09

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