Files¶
File I/O utilities for reading and writing IOU and tracking data.
This module provides functions to read and write CSV files containing IOU (Intersection over Union) metrics and tracking information.
read_iou ¶
read_iou(iou_file)
Read IOU metrics from a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iou_file
|
str
|
Path to the CSV file containing IOU metrics. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame containing IOU metrics with columns for video ID, detection ID, and IOU values. |
Source code in src/dnt/shared/files.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
write_iou ¶
write_iou(ious, iou_file)
Write IOU metrics to a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ious
|
DataFrame
|
DataFrame containing IOU metrics to write. |
required |
iou_file
|
str
|
Path to the output CSV file. |
required |
Source code in src/dnt/shared/files.py
31 32 33 34 35 36 37 38 39 40 41 42 | |
read_track ¶
read_track(track_file)
Read tracking data from a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
track_file
|
str
|
Path to the CSV file containing tracking information. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame containing tracking data with video ID, track ID, coordinates, and additional tracking metrics. |
Source code in src/dnt/shared/files.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
write_track ¶
write_track(tracks, track_file)
Write tracking data to a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tracks
|
DataFrame
|
DataFrame containing tracking data to write. |
required |
track_file
|
str
|
Path to the output CSV file. |
required |
Source code in src/dnt/shared/files.py
68 69 70 71 72 73 74 75 76 77 78 79 | |
read_spd ¶
read_spd(spd_file)
Read speed data from a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spd_file
|
str
|
Path to the CSV file containing speed information. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame containing speed data with columns for video ID, reference, and frame. |
Source code in src/dnt/shared/files.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |