Use Google Colab to run
IMPORTANT: set your Telegram API token to TOKEN
variable
Original image
You can configure parameters in function pixelate
.
def pixelate(image: Union[str, np.ndarray],
colors=10, factor=8, dither=False, quantize_by_factor=4,
segmentation_network=None) -> dict
Just modify the line:
res = pixelate(img, segmentation_network=segm_net)
- move from
bot.polling()
to webhooks - add heuristics for better pixel images
- replace face detection algorithm w/ instance segmentation
(face detection only works if your subject is facing forward) - replace white background w/
bg_color
hyperparameter