-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
我知道您這邊有提供一個 track_demo.py,可以直接套用自己的權重來跑影片。
不過我覺得如果能像 ultralytics 或 boxmot 那樣,提供一個更簡潔明瞭的 Python 範例程式碼,會更直觀也更容易理解。
例如 ultralytics 的範例:
results = model.track(
source="https://youtu.be/LNwODJXcvt4",
tracker="botsort.yaml",
with_reid= True,
conf=0.3,
iou=0.5,
device=0
)
或者 boxmot 的範例
# Set device
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# Load model with pretrained weights and preprocessing transforms
weights = Weights.DEFAULT
model = fasterrcnn_resnet50_fpn_v2(weights=weights, box_score_thresh=0.5)
model.to(device).eval()
transform = weights.transforms()
# Initialize tracker
tracker = BoostTrack(reid_weights=Path('osnet_x0_25_msmt17.pt'), device=device, half=False)
這樣一眼就能清楚知道該如何修改reid權重, iou等其他參數。
另外,ultralytics 與 boxmot 也都有提供各種追蹤方法的 yaml 檔,方便使用者調整參數。
相較之下,您的 track_demo.py 似乎就沒有這樣的設計,或許可以考慮新增這個功能,會更方便使用者進行微調。
Metadata
Metadata
Assignees
Labels
No labels