I'm also sharing some trained weights that I created using the code from this tutorial.

Download the dataset and trained weights from here: https://www.immersivelimit.com/datasets/cigarette-butts

Get Started

Grab the code resources and dataset mentioned above and start with the MaskRCNN_TrainAndInference.ipynb Jupyter Notebook. That will walk you through the rest of the tutorial. This is my first time sharing a dataset, so whether you have trouble or not, feedback is greatly appreciated!

Results to Expect

Your results may vary, depending on where you take your pictures from. If the ground looks different where you live from where I took my training photos, you may get more false positives. You'll notice that mine spots leaves and sometimes thinks they're cigarette butts. It is also easily confused by other cylindrical objects. This project is more of a proof of concept than a perfect solution, so I encourage you to do more experimenting on your own!