Skip to content

Commit

Permalink
Add noramlized, brightness_factor parameter in DetectionVisualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Only-bottle committed Jul 31, 2024
1 parent f286900 commit e058188
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netspresso/inferencer/visualizers/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from matplotlib import pyplot as plt


def _voc_color_map(N=256, normalized=False, brightness_factor=2.0):
def _voc_color_map(N=256, normalized=False, brightness_factor=1.5):
def bitget(byteval, idx):
return ((byteval & (1 << idx)) != 0)

Expand Down Expand Up @@ -31,8 +31,8 @@ def bitget(byteval, idx):


class DetectionVisualizer:
def __init__(self, class_map=None):
self.cmap = _voc_color_map(256)
def __init__(self, class_map=None, normalized=False, brightness_factor=1.5):
self.cmap = _voc_color_map(N=256, normalized=normalized, brightness_factor=brightness_factor)
self.class_map = class_map

def draw(self, image, detections, model_input_shape):
Expand Down

0 comments on commit e058188

Please sign in to comment.