Open deepsea6034625 opened 1 month ago
One more.
I used this code.
import numpy as np
from glasses_detector import GlassesSegmenter
# Initialize full segmentation model of size large
seg_full = GlassesSegmenter(kind='lenses', size='medium') # TODO: change medium to large
# Process the directory of images and save the results in various ways
seg_full.process_dir('images', 'results', format='img', batch_size=6, pbar=False)
Hi @deepsea920415, unfortunately, there's not much that can be done because the dataset is very small. Based on the data (standalone glasses) you are showing, I tried training a new large
model which seems to have slightly improved accuracy.
segmenter = GlassesSegmenter(kind="lenses", size="large", weights="path/to/weights.pth")
Here are two weight files:
Also, you might want to pad your image from both sides to make sure it is a square:
To further improve accuracy, here are some further suggestions (they are, however, beyond the scope of this package):
Thank you. I'll test with them.
The accuracy is improved a lot. But still some bad samples.
But totally, I think overall accuracy is good. If we add some more dataset, the accuracy will be better. Thanks again.
Yup, training on more data is the best way to go!
Hello. First of all, thanks for releasing this excellent project.
I tried to segment lenses from images. But as you can see here, accuracy is not good. Is there any way to improve the accuracy?
Hope to please help me. Thanks again.