Detection of Cigarette buts on the streets using U-net segmentation on Keras.
Cigarette buts on the street has been detected using U-net segmentation using Keras functional API. Different augmentation methods such as flip, rotate has been used in this repo using albumentations library.
First of all, you need to check if you have all required packages to launch the program. If not then install requirements.
$ pip3 install -r requirements.txt
Then cd
into cigarettNet
directory and run python3 main.py -h
to see usage and options.
$ cd game
$ python3 main.py -h
usage: main.py [-h] [--train] [--predict] [--model_path MODEL_PATH]
[--img_path IMG_PATH]
optional arguments:
-h, --help show this help message and exit
--train
--predict
--model_path MODEL_PATH give .h5 model file path
--img_path IMG_PATH image path
--predict
- predict the image--model_path MODEL_PATH
- specify which model (.h5 file) that will be used during prediction time--img_path IMG_PATH
- specify img_path which will be predicted
predict an image
$ python3 main.py --predict --model_path ../model/out/model.h5 --img_path IMG_PATH