Skip to content

Commit

Permalink
Fixing dependencies (#189)
Browse files Browse the repository at this point in the history
* Fixing importing seaborn

* Remove pandas in GH action

* Add thop to requirements
  • Loading branch information
zhiqwang committed Oct 4, 2021
1 parent 9e6198c commit cb23c26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 6 additions & 2 deletions yolort/v5/utils/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cb23c26

Please sign in to comment.