Skip to content

Detection of Cigarette buts on the streets using U-net segmentation.

License

Notifications You must be signed in to change notification settings

Elmar999/Cigarette_buts_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cigarette buts detection using U-Net segmentation

Detection of Cigarette buts on the streets using U-net segmentation on Keras.

Introduction

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.

Installation

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

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

Usage example

predict an image

$ python3 main.py --predict --model_path ../model/out/model.h5 --img_path IMG_PATH

Test Examples

About

Detection of Cigarette buts on the streets using U-net segmentation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages