Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SVivdich02 committed May 15, 2024
1 parent 5f6a97b commit f207000
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
12 changes: 9 additions & 3 deletions experiment/main_calc_metrics_by_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,23 @@ def calculate_metrics(file_name):

print(
"precision={}, 1={}, 0={}".format(
sum_pres/float(len(values_pres)), pres1/float(len(values_pres)), pres0/float(len(values_pres))
sum_pres/float(len(values_pres)),
pres1/float(len(values_pres)),
pres0/float(len(values_pres)),
)
)
print(
"recall={}, 1={}, 0={}".format(
sum_recall/float(len(values_recall)), recall1/float(len(values_recall)), recall0/float(len(values_recall))
sum_recall/float(len(values_recall)),
recall1/float(len(values_recall)),
recall0/float(len(values_recall)),
)
)
print(
"fscore={}, 1={}, 0={}".format(
sum_fScore/float(len(values_fScore)), fscore1/float(len(values_fScore)), fscore0/float(len(values_fScore))
sum_fScore/float(len(values_fScore)),
fscore1/float(len(values_fScore)),
fscore0/float(len(values_fScore)),
)
)

Expand Down
6 changes: 4 additions & 2 deletions experiment/main_kitti_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@ def process_kitti(

result_tuple = segment_pcds(config)

file_name = "experiment_2_a5b5_sem_voxel_offset0_T0l025/start{}_end{}.pickle".format(
config.start_index, config.end_index
file_name = (
"experiment_2_a5b5_sem_voxel_offset0_T0l025/start{}_end{}.pickle".format(
config.start_index, config.end_index
)
)
new_file = open(file_name, "w")
new_file.close()
Expand Down
14 changes: 6 additions & 8 deletions experiment/main_kitti_processing_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ def main():
start_index = current_from_num
end_index = start_index + 4

file_name = (
"experiment_2_a5b5_sem_voxel_offset0_T0l025/start{}_end{}.pickle".format(
start_index, end_index
)
file_name = "experiment_2_a5b5_sem_voxel_offset0_T0l025/start{}_end{}.pickle".format(
start_index, end_index
)

with open(file_name, "rb") as file:
Expand All @@ -91,9 +89,7 @@ def main():
): # в облаке нет инстансов => пропускаем
skipped += 1
print(
"start_index={}, end_index={} skip".format(
start_index, end_index
)
"start_index={}, end_index={} skip".format(start_index, end_index)
)
current_from_num = end_index
continue
Expand All @@ -119,7 +115,9 @@ def main():
pred_labels_unique.discard(0)

with open(
"experiment_2_a5b5_sem_voxel_offset0_T0l025_{}.csv".format(instance_threshold),
"experiment_2_a5b5_sem_voxel_offset0_T0l025_{}.csv".format(
instance_threshold
),
"a",
newline="",
) as file:
Expand Down

0 comments on commit f207000

Please sign in to comment.