diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 32fcf544..58369ab2 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -46,8 +46,6 @@ jobs: pip install opencv-python pip install pycocotools>=2.0.2 pip install onnxruntime - # requirements for ultralytics/yolov5 - pip install pandas seaborn thop - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/requirements.txt b/requirements.txt index b2010605..af9f6bd7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,3 +31,4 @@ torchmetrics # extras -------------------------------------- # pycocotools on PyPI needs python3.7 as minimal # pycocotools>=2.0.2 # corresponds to https://github.com/ppwwyyxx/cocoapi +thop # FLOPs computation diff --git a/yolort/v5/utils/plots.py b/yolort/v5/utils/plots.py index 7f0924d4..c5d8a4d2 100644 --- a/yolort/v5/utils/plots.py +++ b/yolort/v5/utils/plots.py @@ -12,7 +12,6 @@ import matplotlib.pyplot as plt import numpy as np import pandas as pd -import seaborn as sn import torch from PIL import Image, ImageDraw, ImageFont @@ -361,7 +360,12 @@ def plot_study_txt(path="", x=None): def plot_labels(labels, names=(), save_dir=Path("")): - # plot dataset labels + """ + Plot dataset labels + """ + + import seaborn as sn + print("Plotting labels... ") c, b = labels[:, 0], labels[:, 1:].transpose() # classes, boxes nc = int(c.max() + 1) # number of classes