# Object segmentation

**URL:** <https://forum.opencv.org/t/object-segmentation/3686>\
**Category:** Python\
**Created:** [June 4, 2021, 1:38pm UTC](https://forum.opencv.org/t/object-segmentation/3686 "2021-06-04T13:38:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaaShi](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@SaaShi](https://forum.opencv.org/u/SaaShi)\
**Post date:** [June 4, 2021, 1:38pm UTC](https://forum.opencv.org/t/object-segmentation/3686/1 "2021-06-04T13:38:48Z")

</div>

Hi all,

I am currently working on a school project where I want to segment the lenses of eye glasses.  
Is this possible using opencv?

Essentially, I want to extract the shape of the glasses/lenses of glasses from selfies taken straight from the front.

My idea is to identify the eyes (which I have already done) and from there segment the lenses using the eyeglass frame as borders for segmentation.

Is this possible to do?

I have uploaded some pictures of where I am currently.

I have been searching the web for “seeded regional growing” but cant find any usefull code for this.

Slightly off topic: I started of trying to segment the glasses using the pretrained COCO model, but unfourtinatly, its not trained on glasses.

Thanks in advance

 ![glasses1](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/e/ef3f68bfc15f470472a7201e638cd6c3c3694c34.jpeg)
