Skip to content

Segments, classifies and extracts barcode images from larger images containing one or more barcodes

License

Notifications You must be signed in to change notification settings

sparkfish/barberchop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barberchop Logo

barberchop

Segments, classifies and extracts barcode images from larger images containing one or more barcodes.

Overview

Barberchop is a library for detecting and extracting barcodes from images using neural networks trained for object detection or segmentation. Once these barcodes are extracted they can then be passed along to other libraries for image enhancement and decoding.

How It Works

Barberchop uses the custom trained models using datasets of images with barcodes in them.

Barcode Extraction Process

Installation

Use the package manager pip to install barberchop.

pip install barberchop

Usage

import cv2
from Barberchop.ExtractionService import BarberchopYoloService

service = BarberchopYoloService()
img = cv2.imread('barberchop/src/test.png')
results = service.extract(img)

print(f"Found {len(results)} barcodes")
for barcode in results:
    cv2.imshow("barcode", barcode.image)
    cv2.waitKey(1000)

Roadmap

  • Object Detection based Extraction using Yolov5
  • Image Segmentation based Extraction

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Copyright 2021 Sparkfish LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Segments, classifies and extracts barcode images from larger images containing one or more barcodes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages