How to predict size of proposal/wedding ring from a photo

After searching a lot over internet, I couldn’t find a code which could predict the size of the proposal ring from a photograph. So, I decided to write one. Here in the version 1.0, I am using python computer vision module to do the job.

I bought a ring based on this code’s predictions and voila, she said yes!


Make sure that you have the following packages already installed on your ubuntu machine.

  1. python 3
  2. opencv module of python; use pip install opencv-python

Github Gist

Run the following Github Gist code using python. It reads a file called hand1.png. Make sure that the photograph file you are providing has this name, or change the name inside the code.

Ravindra Shinde
Ravindra Shinde
Research Scientist

I am a theoretical and computational condensed matter physicist and quantum chemist. I have around 10 years of research experience, with 6 years in scientific code development. I have authored 16 research articles, 1 book, and peer-reviewed 25 manuscripts.