refactor: single predict.py entrypoint (production + CLI), archive experiments
ci / smoke (push) Canceled after 0s
ci / smoke (push) Canceled after 0s
This commit is contained in:
1 parent
beb9c9fb6b
commit
52d3127302
36 files changed
+161
-48
No files matched your search
@@ -0,0 +1,28 @@
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from ultralytics import YOLO
|
||||
import sys
|
||||
|
||||
def main():
|
||||
model_path = "/home/jetson/karung/model_karung_truk.engine"
|
||||
print("Loading model...")
|
||||
model = YOLO(model_path)
|
||||
|
||||
# Warm up
|
||||
print("Warming up model...")
|
||||
dummy = np.zeros((720, 1280, 3), dtype=np.uint8)
|
||||
results = model(dummy, imgsz=640, device="cuda", verbose=False)
|
||||
print("Warm up complete!")
|
||||
|
||||
# Test tracking with standard bytetrack
|
||||
print("Testing standard bytetrack on 10 frames...")
|
||||
for i in range(10):
|
||||
print(f"Tracking frame {i+1}...")
|
||||
results = model.track(dummy, persist=True, tracker="bytetrack.yaml", verbose=False)
|
||||
print(f"Frame {i+1} track complete! Detections count: {len(results[0])}")
|
||||
|
||||
print("Standard ByteTrack test passed successfully!")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in new issue
Block a user