Provides on-screen visualization of the barbell's movement and the accuracy of its vertical trajectory.
Model: TrainedYOLOv5stoONNXDatasets: Custom dataset built for barbell recognition instead of COCO (trained with a single class)Performance Evaluation: EvaluatedPrecision,Recall,mAP, etc., usingval.pyEpochs: 20- Final
mAP: 86%
- Applied confidence-based filtering and Non-Maximum Suppression (NMS) -> selects representative detections
- Confidence threshold
thresh = 0.3
pip install -r requirements.txtuvicorn main:app --reloadUpload a video file for processing.
Request Body (multipart/form-data):
file: Video file (.mp4).
Example curl:
curl -X POST -F "file=@your_video.mp4" [http://127.0.0.1:8000/process_video/](http://127.0.0.1:8000/process_video/)Response (JSON):
{
"vertical_accuracy": 95.23,
"video_url": "/get_video/output_unique_filename.mp4"
}Download the processed video.
Example URL:
http://127.0.0.1:8000/get_video/output_unique_filename.mp4
- Dataset labeling is required.
- Potential for overfitting due to an insufficient number of training data.
- Performed direct labeling using
LabelImg. - Potential improvements: Applying
Data augmentation(horizontal flip, color variations, etc.) to secure data diversity and enhance the model's generalization performance.
- Impact on trajectory and vertical accuracy in object unrecognition intervals. (Connects the last recognized position and the newly recognized position with a straight line)
- Handling of object unrecognition intervals and re-detection after prolonged object loss. Setup variables related to interval re-detection:
last_detection_frame = -1 # Frame number when the object was last detected
current_frame = 0 # Current frame number
max_frame_gap = int(fps * 1.5) # Maximum allowed frame gap (1.5 seconds)