arunponnusamy / cvlib

A simple, high level, easy to use, open source Computer Vision library for Python.

Home Page:http://arunponnusamy.com/cvlib/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

object Detection color

T2brozz opened this issue · comments

Is there a list with all classes and thier colors? Like, Person -> violet

Yes @T2brozz. By default, random colors are generated for the 80 object classes. You can send in a list of 80 color values to the draw_bbox function to use that instead of random colors.
https://github.com/arunponnusamy/cvlib/blob/master/cvlib/object_detection.py#L34

draw_bbox(img, bbox, labels, confidence, colors=None, write_conf=False)

The list of 80 classes in order can be found here https://github.com/arunponnusamy/object-detection-opencv/raw/master/yolov3.txt . Color values are in (B,G,R) format ranging from 0 to 255. For example (0,255,0) will be green.

thank you