Explorar el Código

seaborn plotting correlogram addition

5.0
Glenn Jocher hace 4 años
padre
commit
987c226849
Se han modificado 2 ficheros con 15 adiciones y 1 borrados
  1. +2
    -1
      requirements.txt
  2. +13
    -0
      utils/general.py

+ 2
- 1
requirements.txt Ver fichero

@@ -23,4 +23,5 @@ tqdm>=4.41.0
# scikit-learn==0.19.2 # for coreml quantization

# extras --------------------------------------
# thop
# thop # FLOPS computation
# seaborn # plotting

+ 13
- 0
utils/general.py Ver fichero

@@ -1188,6 +1188,19 @@ def plot_labels(labels, save_dir=''):
plt.savefig(Path(save_dir) / 'labels.png', dpi=200)
plt.close()

# seaborn correlogram
try:
import seaborn as sns
import pandas as pd
x = pd.DataFrame(b.transpose(), columns=['x', 'y', 'width', 'height'])
sns.pairplot(x, corner=True, diag_kind='hist', kind='scatter', markers='o',
plot_kws=dict(s=3, edgecolor=None, linewidth=1, alpha=0.02),
diag_kws=dict(bins=50))
plt.savefig(Path(save_dir) / 'labels_correlogram.png', dpi=200)
plt.close()
except Exception as e:
pass


def plot_evolution(yaml_file='data/hyp.finetune.yaml'): # from utils.general import *; plot_evolution()
# Plot hyperparameter evolution results in evolve.txt

Cargando…
Cancelar
Guardar