isi-vista / adam

Abduction to Demonstrate an Articulate Machine
MIT License
11 stars 3 forks source link

Color segmentation #1184

Closed spigo900 closed 1 year ago

spigo900 commented 1 year ago

FYI: The implementation of cluster_small_strokes() is not very efficient, particularly the way it iterates over stroke clusters. If either of you have suggestions I'm open to it. I thought of using a heap but that doesn't seem to work because once I've chosen a merge target I need to remove that one as well (and only that one) -- unless I just pop until that stroke is gone and then continue, rebuilding the heap every loop. But I'm not sure that's better than sorting the list of clusters every loop.

Anyway, it works and seems fast enough. That is, it takes AFAICT about 1.5 hours to complete on the M5 objects training data when using the color-refined segmentations. So, a while but not unreasonably long.