I heard a lot of stories about people, even whole teams, who works on machine learning problems, getting stuck for whole years trying to solve the problem. And then somebody else came using simple techniques and get much better results! There isn’t any definite way how to overcome such freezes, but we can learn from others mistakes.

Don't get stuck, machine learning

So, here is what happens to me over the last week. I started working on my OCR project and I started by detecting and cutting out a paper page from a photo (I will talk about my solution later). There are already different solutions for that and it is fairly easy to make it work for ideal image (white paper on a solid dark background), but if fails easily on more complex images.

As I try to improve it, the code started to get more and more complex, but still  new problems occur. A whole week passed and I was still trying new solutions without any significant improvement. The problem is that while learning about new filters, functions, etc., I’m still coming up with new ideas for a solution and it’s hard to tell whether they will work or not without trying them. I definitely can’t say that I didn’t make any progress; I just figure out ways how not to do it.

Prevention

You can expect that everything will go well, but you should be able to distinguish between hard problem and dealing with unimportant stuff. My solution for that is to divide the whole problem into separated steps, which exchange only data (they’re almost independent of each other).

Machine Learning project steps

Now my goal is to implement all steps as fast as possible. It doesn’t have to be perfect, but I have to get at least some results. After that I will able to measure the performance (probably using simple percentage precision or F1 score). Once I can measure overall performance, I can go back to each step and try to improve it. While improving each step, I should still keep in mind the overall performance and start improving the parts which has the most significant impact on it.

Conclusion

Strategy is finished and now is time for execution. I already spend a lot of time on the first step and now is time to move forward. I know it won’t be easy, but I’m exited about this project. Hopefully, if I stick to my plan, I will be able to finish it on time. Wish me luck!