Bladeren bron

seaborn plotting correlogram addition

5.0
Glenn Jocher 4 jaren geleden
bovenliggende
commit
987c226849
2 gewijzigde bestanden met toevoegingen van 15 en 1 verwijderingen
  1. +2
    -1
      requirements.txt
  2. +13
    -0
      utils/general.py

+ 2
- 1
requirements.txt Bestand weergeven

@@ -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 Bestand weergeven

@@ -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

Laden…
Annuleren
Opslaan