<jupyter_start><jupyter_text>Hats Instance SpecificEval instance specific hats<jupyter_code>import numpy as np
import os
import fnmatch
import pandas as pd
import sklearn.metrics as sm
import scipy.stats as ss
import matplotlib.pyplot as plt

import dense_correspondence_manipulation.utils.utils as utils
utils.add_dense_correspondence_to_python_path()

from dense_correspondence.evaluation.evaluation import DenseCorrespondenceEvaluationPlotter as DCEP
folder_name = "hats"
path_to_nets = os.path.join("/home/manuelli/code/data_volume/pdc/trained_models", folder_name)
all_nets = sorted(os.listdir(path_to_nets))
nets_to_plot = []

for net in all_nets:
    if "specific" in net and "2.000" in net and not "half" in net:
        nets_to_plot.append(os.path.join(folder_name,net))
        
    

    
# nets_list = []
# nets_list.append("caterpillar_dont_scale_hard_negatives_e3_3d")
# nets_list.append("caterpillar_scale_hard_negatives_e0_3d")

# for net in nets_list:
#     nets_to_plot.append(os.path.join("l2_questions/",net))


    
# print nets_to_plot
print nets_to_plot
# nets_to_plot = ["starbot_1_train_3"]<jupyter_output><empty_output><jupyter_text>Training<jupyter_code>p = DCEP()
dc_source_dir = utils.getDenseCorrespondenceSourceDir()

network_name = nets_to_plot[0]
path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis/train/data.csv")
fig_axes = DCEP.run_on_single_dataframe(path_to_csv, label=network_name, save=False)

for network_name in nets_to_plot[1:]:
    path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis/train/data.csv")
    fig_axes = DCEP.run_on_single_dataframe(path_to_csv, label=network_name, previous_fig_axes=fig_axes, save=False)

_, axes = fig_axes
# axes[0].set_title("Training Set")
plt.show()<jupyter_output><empty_output><jupyter_text>Test<jupyter_code>p = DCEP()
dc_source_dir = utils.getDenseCorrespondenceSourceDir()

network_name = nets_to_plot[0]
path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis/test/data.csv")
fig_axes = DCEP.run_on_single_dataframe(path_to_csv, label=network_name, save=False)

for network_name in nets_to_plot[1:]:
    path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis/test/data.csv")
    fig_axes = DCEP.run_on_single_dataframe(path_to_csv, label=network_name, previous_fig_axes=fig_axes, save=False)

_, axes = fig_axes
# axes[0].set_title("Test Set")
plt.show()<jupyter_output><empty_output><jupyter_text>Cross Scene Single Object<jupyter_code># p = DCEP()
# dc_source_dir = utils.getDenseCorrespondenceSourceDir()

# network_name = nets_to_plot[0]
# path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis/cross_scene/data.csv")
# fig_axes = DCEP.run_on_single_dataframe(path_to_csv, label=network_name, save=False)

# for network_name in nets_to_plot[1:]:
#     path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis/cross_scene/data.csv")
#     fig_axes = DCEP.run_on_single_dataframe(path_to_csv, label=network_name, previous_fig_axes=fig_axes, save=False)

# _, axes = fig_axes
# # axes[0].set_title("Cross Scene Set")
# plt.show()<jupyter_output><empty_output><jupyter_text>Separating Distinct Objects<jupyter_code>p = DCEP()
dc_source_dir = utils.getDenseCorrespondenceSourceDir()

network_name = nets_to_plot[0]
path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis",
                               'across_object', "data.csv")
fig_axes = DCEP.run_on_single_dataframe_across_objects(path_to_csv, label=network_name, save=False)

for network_name in nets_to_plot[1:]:
    path_to_csv = os.path.join(dc_source_dir, "data_volume", "pdc", "trained_models", network_name, "analysis",
                               'across_object', "data.csv")
    fig_axes = DCEP.run_on_single_dataframe_across_objects(path_to_csv, label=network_name, previous_fig_axes=fig_axes, save=False)

_, axes = fig_axes
# axes[0].set_title("Across Object")
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11833056675361632, 'fraction_numerical': 0.005454114299264881, 'mean_word_length': 6.811111111111111, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '46805', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1590, 'n_words': 239, 'path': 'dense_correspondence/experiments/hats/eval_hats_specific.ipynb', 'repo_name': 'jan-tgk/pytorch-dense-correspondence', 'size': '4217'}