Download microprograms/temporal_segmentation/start_takeoff.py from X-NS/NSAQA: direct link, hf CLI and curl.
- Browser
- Download file 802 Bytes
-
https://huggingface.co/spaces/X-NS/NSAQA/resolve/main/microprograms/temporal_segmentation/start_takeoff.py
- Command line
-
hf download hf://spaces/X-NS/NSAQA/microprograms/temporal_segmentation/start_takeoff.py
-
curl -L -o start_takeoff.py https://huggingface.co/spaces/X-NS/NSAQA/resolve/main/microprograms/temporal_segmentation/start_takeoff.py
802 Bytes
| from microprograms.errors.angles_micro_programs import applyPositionTightnessError | |
| from models.pose_estimator.pose_estimator_model_setup import get_pose_estimation | |
| from microprograms.errors.distance_from_springboard_micro_program import board_end | |
| from microprograms.errors.distance_from_springboard_micro_program import find_which_side_board_on | |
| from models.detectron2.platform_detector_setup import get_platform_detector | |
| import numpy as np | |
| import cv2 | |
| def takeoff_microprogram_one_frame(filepath, above_board, on_board, pose_pred=None): | |
| if not above_board: | |
| return 0 | |
| if on_board: | |
| return 1 | |
| return 0 | |
| # angle = applyPositionTightnessError(filepath, pose_pred) | |
| # if angle is None: | |
| # return 0 | |
| # if angle > 90: | |
| # return 1 | |
| # else: | |
| # return 0 |