Detectron2/Mask R-CNN notebook experiments for trash instance segmentation, with data visualization, Grad-CAM exploration and a Telegram image-inference prototype.
- Mask R-CNN notebook: COCO dataset registration, training, evaluation, visualizations and bot experiments.
- Preprocessing and visualization script: COCO annotation and class-distribution inspection.
The notebook targets Google Colab and uses PyTorch, TorchVision, Detectron2, OpenCV, NumPy and Matplotlib. The preprocessing script additionally uses pycocotools. Match Detectron2 to the selected PyTorch/CUDA environment before training.
Update Drive paths and supply the referenced COCO images/annotations and checkpoint files; these are not bundled. Notebook sections represent alternative experiments and should be reviewed individually.
The Telegram section additionally requires python-telegram-bot and an existing bot token set through TELEGRAM_BOT_TOKEN in the runtime environment. The source contains no usable bot token. Do not place credentials in notebook cells or outputs.
The Grad-CAM sections are experimental visualizations. The repository does not establish a production deployment or independently reproduced segmentation benchmark.