### What problem does this PR solve?

As title

### Type of change

- [x] Refactoring

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2025-08-27 18:56:40 +08:00
committed by GitHub
parent 2d89863fdd
commit 5abd0bbac1
9 changed files with 25 additions and 24 deletions

View File

@ -31,11 +31,11 @@ def save_results(image_list, results, labels, output_dir='output/', threshold=0.
logging.debug("save result to: " + out_path)
def draw_box(im, result, lables, threshold=0.5):
def draw_box(im, result, labels, threshold=0.5):
draw_thickness = min(im.size) // 320
draw = ImageDraw.Draw(im)
color_list = get_color_map_list(len(lables))
clsid2color = {n.lower():color_list[i] for i,n in enumerate(lables)}
color_list = get_color_map_list(len(labels))
clsid2color = {n.lower():color_list[i] for i,n in enumerate(labels)}
result = [r for r in result if r["score"] >= threshold]
for dt in result: