Initial Commit

This commit is contained in:
2023-04-07 09:44:12 +00:00
parent 42d655a451
commit c49645d7bc
13 changed files with 423 additions and 128 deletions

20
export_label_id.py Normal file
View File

@@ -0,0 +1,20 @@
import os
import json
# read data/wlasl/wlasl_class_list.txt
labels = {}
with open("data/sign_to_prediction_index_map.json", "r") as f:
sign_to_prediction_index_map = json.load(f)
# switch key and value
for key, value in sign_to_prediction_index_map.items():
labels[value] = key
if os.path.exists("data/processed/id_to_label.json"):
os.remove("data/processed/id_to_label.json")
with open("data/processed/id_to_label.json", "w") as f:
json.dump(labels, f)