segmentation-models opencv-python tensorflow keras patchify tqdm Pillow scikit-learn numpy