Measuring the dimensions of a cuboid using a mobile camera

Hi Edge Impulse team,

I am working on a computer vision project where I need to detect a cuboid object and calculate the physical lengths of its edges.

In the attached images, you can see the side and top faces of the object. My goal is to:

  1. Detect and calculate the lengths of all 4 edges of the front face from one image.
  2. Detect and calculate the lengths of all 4 edges of the top face from a second image.

Could you point me in the right direction or suggest a pipeline on how to achieve this using Edge Impulse? I am ready to implement this, regardless of the technical difficulty.

Thank you!
image