Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions code/kappa_data/feature_to_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def add_label(df):


if __name__ == "__main__":
path = # path to label files for which a class should be estimated
path = '.' # path to label files for which a class should be estimated
print("Path is current folder")
# get all csv files in path
csvs = [x for x in os.listdir(path) if x.endswith('.csv')]
# open files and add the corresponding labels to each image id
Expand All @@ -66,4 +67,4 @@ def add_label(df):
df = pd.read_csv(full_path, delimiter=';')
new_df = add_label(df)
new_file_name = full_path + 'labeltestnew.csv'
export_csv = new_df.to_csv(new_file_name)
export_csv = new_df.to_csv(new_file_name)
2 changes: 1 addition & 1 deletion code/pipeline/multiple_models_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main():
# loading the data
@st.cache
def load_data():
return tm.load_data("../../annotations")
return tm.load_data("../../annotations/evaluation_agreement_1")

raw_data, dummy_data = load_data()
labels = [col for col in dummy_data if col.startswith('Class')]
Expand Down
5 changes: 5 additions & 0 deletions code/pipeline/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ def load_data(folder):

if not infile.is_file():
continue

# disregard the agreement files
if infile.name.startswith("agreement"):
continue

# extract the class/category name
infile_name = infile.name[infile.name.index("_"):]
infile_cat = infile_name[7:-4]
Expand Down