You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importosimportnumpyasnpimportmotmetricsasmmimportpandasaspddefcompute_motchallenge(gt_files, test_files):
accs= []
forgt_file, test_fileinzip(gt_files, test_files):
df_gt=mm.io.loadtxt(gt_file)
df_test=mm.io.loadtxt(test_file)
# HOTA requires different thresholds for matchingth_list=np.arange(0.05, 0.99, 0.05)
# Compare ground truth and test dataaccs.append(mm.utils.compare_to_groundtruth_reweighting(df_gt, df_test, "iou", distth=th_list))
returnaccsgt_files= ['/Users/mikel.brostrom/boxmot/assets/MOT17-mini/train/MOT17-04-FRCNN/gt/gt.txt',
'/Users/mikel.brostrom/boxmot/assets/MOT17-mini/train/MOT17-02-FRCNN/gt/gt.txt']
test_files= ['/Users/mikel.brostrom/boxmot/runs/mot/yolov8n_osnet_x0_25_msmt17_botsort/MOT17-04-FRCNN.txt',
'/Users/mikel.brostrom/boxmot/runs/mot/yolov8n_osnet_x0_25_msmt17_botsort/MOT17-02-FRCNN.txt']
accs=compute_motchallenge(gt_files, test_files)
mh=mm.metrics.create()
summary=mh.compute_many(
accs,
metrics=[
"deta_alpha",
"assa_alpha",
"hota_alpha",
],
generate_overall=True, # `Overall` is the average we need only
)
strsummary=mm.io.render_summary(
summary, # Use list to preserve `DataFrame` typeformatters=mh.formatters,
namemap={"hota_alpha": "HOTA", "assa_alpha": "ASSA", "deta_alpha": "DETA"},
)
print(strsummary)
But I get the following error:
File "/Users/mikel.brostrom/Library/Caches/pypoetry/virtualenvs/boxmot-YDNZdsaB-py3.11/lib/python3.11/site-packages/motmetrics/metrics.py", line 681, in events_to_df_map
raw = df[df.Type =="RAW"]
^^^^^^^
AttributeError: 'list' object has no attribute 'Type'
How should we use HOTA when working with multiple files @Justin900429 ? Are we supposed to run mh.compute_many for each sequence as accumulating with HOTA does not seem to work?
The text was updated successfully, but these errors were encountered:
I am trying to run the following:
But I get the following error:
When flattening the 2D list obtained from compare_to_groundtruth_reweighting , by:
I get:
How should we use HOTA when working with multiple files @Justin900429 ? Are we supposed to run
mh.compute_many
for each sequence as accumulating with HOTA does not seem to work?The text was updated successfully, but these errors were encountered: