extract level and color
generate train data for clustering