edit ImageSegmenter class