Filter matplotlib>=3.7.2
tight layout warning (#3614)
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
import contextlib
|
||||
import math
|
||||
import warnings
|
||||
from pathlib import Path
|
||||
|
||||
import cv2
|
||||
@ -233,6 +234,9 @@ def plot_labels(boxes, cls, names=(), save_dir=Path(''), on_plot=None):
|
||||
import pandas as pd
|
||||
import seaborn as sn
|
||||
|
||||
# Filter matplotlib>=3.7.2 warning
|
||||
warnings.filterwarnings('ignore', category=UserWarning, message='The figure layout has changed to tight')
|
||||
|
||||
# Plot dataset labels
|
||||
LOGGER.info(f"Plotting labels to {save_dir / 'labels.jpg'}... ")
|
||||
b = boxes.transpose() # classes, boxes
|
||||
|
Reference in New Issue
Block a user