MCPcopy Create free account

hub / github.com/ArtLabss/tennis-tracking / functions

Functions69 in github.com/ArtLabss/tennis-tracking

↓ 10 callersFunctionline_intersection
Find 2 lines intersection point
court_detector.py:464
↓ 4 callersFunctioncenter_of_box
Calculate the center of a box
detection.py:276
↓ 4 callersFunctionmark_player_box
(frame, boxes, frame_num)
detection.py:270
↓ 3 callersMethod_detect
Use deep learning model to detect all person in the image
detection.py:203
↓ 3 callersMethoddetect
Detecting the court in the frame
court_detector.py:50
↓ 3 callersFunctionget_video_properties
(video)
utils.py:27
↓ 3 callersMethodpredict
Advances the state vector and returns the predicted bounding box estimate.
sort.py:134
↓ 3 callersMethodupdate
Params: dets - a numpy array of detections in the format [[x1,y1,x2,y2,score],[x1,y1,x2,y2,score],...] Requires: this method must be
sort.py:210
↓ 2 callersFunctionconvert_bbox_to_z
Takes a bounding box in the form [x1,y1,x2,y2] and returns z in the form [x,y,s,r] where x,y is the centre of the box and s is the scale/area
sort.py:63
↓ 2 callersFunctionconvert_x_to_bbox
Takes a bounding box in the centre form [x,y,s,r] and returns it in the form [x1,y1,x2,y2] where x1,y1 is the top left and x2,y2 is the botto
sort.py:78
↓ 2 callersMethodderegister
(self, objectID)
TrackPlayers/trackplayers.py:121
↓ 2 callersMethoddetect_player_1
Detecting bottom player
detection.py:45
↓ 2 callersMethoddetect_top_persons
Detect all persons in the top half of the court
detection.py:116
↓ 2 callersFunctiondiff_xy
(coords)
detection.py:477
↓ 2 callersMethodfind_player_2_box
Discriminate the top player box from other persons in the frame
detection.py:165
↓ 2 callersMethodget_court_mask
Get mask of the court
court_reference.py:96
↓ 2 callersFunctionget_dtype
()
utils.py:16
↓ 2 callersMethodget_important_lines
Returns all lines of the court
court_reference.py:73
↓ 2 callersFunctioninterpolation
(coords)
detection.py:461
↓ 2 callersFunctionnan_helper
Helper to handle indices and logical indices of NaNs. Input: - y, 1d numpy array with possible NaNs Output: - nans, logical i
detection.py:444
↓ 2 callersMethodregister
(self, centroid)
TrackPlayers/trackplayers.py:114
↓ 2 callersFunctionremove_outliers
(x, y, coords)
detection.py:509
↓ 2 callersMethodtrack_court
Track court location after detection
court_detector.py:369
↓ 1 callersMethod_classify_lines
Classify line to vertical and horizontal lines
court_detector.py:141
↓ 1 callersMethod_detect_lines
Finds all line in frame using Hough transform
court_detector.py:117
↓ 1 callersMethod_filter_pixels
Filter pixels by using the court line structure
court_detector.py:87
↓ 1 callersMethod_find_homography
Finds transformation from reference court to frame`s court using 4 pairs of matching points
court_detector.py:235
↓ 1 callersMethod_get_confi_score
Calculate transformation score
court_detector.py:283
↓ 1 callersMethod_merge_lines
Merge lines that belongs to the same frame`s lines
court_detector.py:190
↓ 1 callersMethod_threshold
Simple thresholding for white pixels
court_detector.py:78
↓ 1 callersMethodadd_court_overlay
Add overlay of the court to the frame
court_detector.py:298
↓ 1 callersFunctionarea_of_box
(box)
detection.py:287
↓ 1 callersFunctionassociate_detections_to_trackers
Assigns detections to tracked object (both represented as bounding boxes) Returns 3 lists of matches, unmatched_detections and unmatched_tracke
sort.py:155
↓ 1 callersFunctionboxes_dist
Calculate the cumulative distance of all the boxes
detection.py:293
↓ 1 callersMethodbuild_court_reference
Create court reference image using the lines positions
court_reference.py:53
↓ 1 callersMethodcalculate_all_persons_dists
For each person detected in top half court, calculate the distance their box has moved in the video
detection.py:155
↓ 1 callersMethodcalculate_feet_positions
Calculate the feet position of both players using the inverse transformation of the court and the boxes of both players
detection.py:229
↓ 1 callersFunctioncreate_top_view
Creates top view video of the gameplay
detection.py:420
↓ 1 callersFunctiondraw_ball_position
Calculate the ball position of both players using the inverse transformation of the court and the x, y positions
detection.py:330
↓ 1 callersMethodfind_lines_location
Finds important lines location on frame
court_detector.py:308
↓ 1 callersMethodget_state
Returns the current bounding box estimate.
sort.py:148
↓ 1 callersFunctioniou_batch
From SORT: Computes IOU between two bboxes in the form [x1,y1,x2,y2]
sort.py:44
↓ 1 callersFunctionlinear_assignment
(cost_matrix)
sort.py:33
↓ 1 callersFunctionmerge
(frame, image)
detection.py:314
↓ 1 callersFunctionparse_args
Parse input arguments.
sort.py:261
↓ 1 callersFunctionremove_ball_boy
(detected_person_img, lower_col, upper_col)
TrackPlayers/trackplayers.py:22
↓ 1 callersFunctionsections_intersect
Check if two sections intersect
detection.py:306
↓ 1 callersFunctionsort_intersection_points
sort intersection points from top left to bottom right
court_detector.py:474
Method__init__
(self, dtype=torch.FloatTensor)
detection.py:18
Method__init__
(self)
court_reference.py:10
Method__init__
(self, verbose=0)
court_detector.py:19
Method__init__
Initialises a tracker using initial bounding box.
sort.py:97
Method__init__
Sets key parameters for SORT
sort.py:200
Method__init__
(self, maxDisappeared=300)
TrackPlayers/trackplayers.py:101
Method_classify_vertical
Classify vertical lines to right and left vertical lines using the location on frame
court_detector.py:171
Functionbinary
(x)
TrackPlayers/trackplayers.py:14
Functioncalculate_feet_positions
Calculate the feet position of both players using the inverse transformation of the court and the boxes of both players
detection.py:355
Functioncrop_center
(image)
utils.py:7
Methodget_extra_parts
(self)
court_reference.py:82
Functionget_output_layers
(net)
TrackPlayers/trackplayers.py:8
Functionget_stickman_line_connection
()
utils.py:56
Methodget_warped_court
Returns warped court using the reference court and the transformation of the court
court_detector.py:333
Functionpredict_players
(outs, LABELS, img, confidence_threshold=0.8)
TrackPlayers/trackplayers.py:37
Methodsave_all_court_configurations
Create all configurations of 4 points on court reference
court_reference.py:86
Functionstr2bool
(v)
utils.py:45
FunctiontrackNet
( n_classes , input_height, input_width )
Models/tracknet.py:4
Methodupdate
Updates the state vector with observed bbox.
sort.py:124
Methodupdate
(self, rects)
TrackPlayers/trackplayers.py:127
Functionupdate_boxes
(box)
TrackPlayers/trackplayers.py:91