Ultimate Frisbee Field Boundary Computer Vision Project
UltimateFrisbeedrone
Updated 8 days ago
Description
Ultimate Frisbee Drone
Use consistent source video for ultimate frisbee games to create computer vision models
Goals
- Use endzone cones to try field boundary detection, homography
- Light / Dark player object detection
- Frisbee object detection
Steps
- download source video footage (See image names for yt IDs)
- dataset 1
- capture frames every 60 seconds
- label visible endzone cones
- label info boxes when present (score updates, injuries, timeouts, etc . . .)
- dataset 2
- add additional frames to dataset 1, every 15 seconds of video
- to be annotated
Cone Label Schematic
Frame Capture Script
# paths can be strings or Path objects, yt_id should be string
# update progress bar with each image saved or each frame processed
def get_frames(video_path, image_path, yt_id, interval=5):
if not video_path.exists():
print('video not found')
return
if not image_path.exists():
image_path.mkdir()
# open video, get frames per second
cap = cv2.VideoCapture(str(video_path))
fps = int(cap.get(cv2.CAP_PROP_FPS))
counter = 0
# pbar = tqdm(total=int(cap.get(cv2.CAP_PROP_FRAME_COUNT)/(fps*interval)),
# position=0, leave=True)
pbar = tqdm(total=int(cap.get(cv2.CAP_PROP_FRAME_COUNT)),
position=0, leave=True)
while cap.isOpened():
success = cap.grab()
pbar.update(1)
if success:
counter += 1
if counter % (fps * interval) == 0:
save_path = Path(image_path, f'{yt_id}_{counter}.png')
# pbar.update(1)
if not save_path.exists():
_, image = cap.retrieve()
cv2.imwrite(str(save_path), image)
else:
break
pbar.close()
cap.release()
cv2.destroyAllWindows()
return
Build Computer Vision Applications Faster with Supervision
Visualize and process your model results with our reusable computer vision tools.
Cite This Project
LICENSE
CC BY 4.0 If you use this dataset in a research paper, please cite it using the following BibTeX:
@misc{
ultimate-frisbee-field-boundary_dataset,
title = { Ultimate Frisbee Field Boundary Dataset },
type = { Open Source Dataset },
author = { UltimateFrisbeedrone },
howpublished = { \url{ https://universe.roboflow.com/ultimatefrisbeedrone/ultimate-frisbee-field-boundary } },
url = { https://universe.roboflow.com/ultimatefrisbeedrone/ultimate-frisbee-field-boundary },
journal = { Roboflow Universe },
publisher = { Roboflow },
year = { 2024 },
month = { dec },
note = { visited on 2024-12-22 },
}