Sean Carnahan commited on
Commit
b39cc0b
·
1 Parent(s): e2492f0

Incorporate external/BodybuildingPoseClassifier files directly, remove submodule

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. external/BodybuildingPoseClassifier/.gitignore +0 -0
  2. external/BodybuildingPoseClassifier/LICENSE +21 -0
  3. external/BodybuildingPoseClassifier/README.md +36 -0
  4. external/BodybuildingPoseClassifier/app.py +39 -0
  5. external/BodybuildingPoseClassifier/bodybuilding_pose_classifier.h5 +3 -0
  6. external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/1.png +3 -0
  7. external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/2.png +3 -0
  8. external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/3.png +3 -0
  9. external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/4.png +3 -0
  10. external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/5.png +3 -0
  11. external/BodybuildingPoseClassifier/data/train/bLatSpread/1.png +3 -0
  12. external/BodybuildingPoseClassifier/data/train/bLatSpread/2.png +3 -0
  13. external/BodybuildingPoseClassifier/data/train/bLatSpread/3.png +3 -0
  14. external/BodybuildingPoseClassifier/data/train/bLatSpread/4.png +3 -0
  15. external/BodybuildingPoseClassifier/data/train/bLatSpread/5.png +3 -0
  16. external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/1.png +3 -0
  17. external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/2.png +3 -0
  18. external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/3.png +3 -0
  19. external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/4.png +3 -0
  20. external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/5.png +3 -0
  21. external/BodybuildingPoseClassifier/data/train/fLatSpread/1.png +3 -0
  22. external/BodybuildingPoseClassifier/data/train/fLatSpread/2.png +3 -0
  23. external/BodybuildingPoseClassifier/data/train/fLatSpread/3.png +3 -0
  24. external/BodybuildingPoseClassifier/data/train/fLatSpread/4.png +3 -0
  25. external/BodybuildingPoseClassifier/data/train/fLatSpread/5.png +3 -0
  26. external/BodybuildingPoseClassifier/data/train/sideChest/1.png +3 -0
  27. external/BodybuildingPoseClassifier/data/train/sideChest/2.png +3 -0
  28. external/BodybuildingPoseClassifier/data/train/sideChest/3.png +3 -0
  29. external/BodybuildingPoseClassifier/data/train/sideChest/4.png +3 -0
  30. external/BodybuildingPoseClassifier/data/train/sideChest/5.png +3 -0
  31. external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/1.png +3 -0
  32. external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/2.png +3 -0
  33. external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/3.png +3 -0
  34. external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/4.png +3 -0
  35. external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/5.png +3 -0
  36. external/BodybuildingPoseClassifier/data/validation/bLatSpread/1.png +3 -0
  37. external/BodybuildingPoseClassifier/data/validation/bLatSpread/2.png +3 -0
  38. external/BodybuildingPoseClassifier/data/validation/bLatSpread/3.png +3 -0
  39. external/BodybuildingPoseClassifier/data/validation/bLatSpread/4.png +3 -0
  40. external/BodybuildingPoseClassifier/data/validation/bLatSpread/5.png +3 -0
  41. external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/1.png +3 -0
  42. external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/2.png +3 -0
  43. external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/3.png +3 -0
  44. external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/4.png +3 -0
  45. external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/5.png +3 -0
  46. external/BodybuildingPoseClassifier/data/validation/fLatSpread/1.png +3 -0
  47. external/BodybuildingPoseClassifier/data/validation/fLatSpread/2.png +3 -0
  48. external/BodybuildingPoseClassifier/data/validation/fLatSpread/3.png +3 -0
  49. external/BodybuildingPoseClassifier/data/validation/fLatSpread/4.png +3 -0
  50. external/BodybuildingPoseClassifier/data/validation/fLatSpread/5.png +3 -0
external/BodybuildingPoseClassifier/.gitignore ADDED
Binary file (68 Bytes). View file
 
external/BodybuildingPoseClassifier/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2024 David Unterguggenberger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
external/BodybuildingPoseClassifier/README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Bodybuilding Pose Classifier
2
+
3
+ ## Project Overview
4
+ This model is trained to identify and classify various bodybuilding poses from images. The aim of this project is to demonstrate the application of deep learning techniques for automated image recognition in specific sports disciplines.
5
+
6
+ ## Model Description
7
+ The model uses a Convolutional Neural Network (CNN) architecture to recognize specific poses from images of bodybuilders. It has been trained with training data and validated with validation data to ensure the accuracy and robustness of the model.
8
+
9
+ ## Datasets
10
+ - **Training Data**: Consists of 25 images per pose category, captured from different angles and under various lighting conditions.
11
+ - **Validation Data**: Used to monitor the model's performance during training and to prevent overfitting. Contains 25 images per pose category, similar but not identical to the training images.
12
+
13
+ ## Technical Details
14
+ The model was developed in Python using the following libraries and technologies:
15
+
16
+ - **TensorFlow and Keras**: For constructing, training, and validating the CNN.
17
+ - **NumPy**: For data manipulation and processing.
18
+ - **Matplotlib**: For visualizing training and validation results.
19
+ - **ImageDataGenerator from Keras**: Used for image preprocessing and data augmentation to enhance model performance by increasing the diversity of the training data.
20
+
21
+ ## Installation
22
+ 1. Clone the repository:
23
+ ```bash
24
+ git clone https://github.com/JumpiiX/BodybuildingPoseClassifier.git
25
+ ```
26
+ 2. Install the required dependencies:
27
+ ```bash
28
+ pip install -r requirements.txt
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ### Train and Test the Model
34
+ To train and test the model, execute the following command:
35
+ ```bash
36
+ python training/train_model.py
external/BodybuildingPoseClassifier/app.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, request, render_template
2
+ from tensorflow.keras.models import load_model
3
+ from tensorflow.keras.preprocessing import image
4
+ import numpy as np
5
+ import os
6
+
7
+ app = Flask(__name__)
8
+
9
+ model_path = 'bodybuilding_pose_classifier.h5'
10
+
11
+ model = load_model(model_path)
12
+
13
+ class_labels = ['Side Chest', 'Front Double Biceps', 'Back Double Biceps', 'Front Lat Spread', 'Back Lat Spread']
14
+
15
+ def predict_pose(img_path):
16
+ img = image.load_img(img_path, target_size=(150, 150))
17
+ img_array = image.img_to_array(img)
18
+ img_array = np.expand_dims(img_array, axis=0) / 255.0
19
+ predictions = model.predict(img_array)
20
+ predicted_class = np.argmax(predictions, axis=1)
21
+ return class_labels[predicted_class[0]]
22
+
23
+ @app.route('/', methods=['GET', 'POST'])
24
+ def upload_file():
25
+ if request.method == 'POST':
26
+ if 'file' not in request.files:
27
+ return 'No file part'
28
+ file = request.files['file']
29
+ if file.filename == '':
30
+ return 'No selected file'
31
+ if file:
32
+ filepath = os.path.join('uploads', file.filename)
33
+ file.save(filepath)
34
+ pose = predict_pose(filepath)
35
+ return render_template('result.html', pose=pose)
36
+ return render_template('index.html')
37
+
38
+ if __name__ == '__main__':
39
+ app.run(debug=True)
external/BodybuildingPoseClassifier/bodybuilding_pose_classifier.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56cdfbdadbef2675622e699fcf444d5bcb0aab6c695bb32165ae60e984278346
3
+ size 228483160
external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/1.png ADDED

Git LFS Details

  • SHA256: 5440053672ec87fc41e0cb84a06e65530b07089b97e14fd6c03353626199d701
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB
external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/2.png ADDED

Git LFS Details

  • SHA256: 15e9746d1be1ddea281ef00397544ac9c24c4916da457ed031f3d7a887d7c911
  • Pointer size: 131 Bytes
  • Size of remote file: 266 kB
external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/3.png ADDED

Git LFS Details

  • SHA256: a4f7fad1724559c7e8c9e5f194319c53cda8cd4e348637e3dd6eb23613043f08
  • Pointer size: 130 Bytes
  • Size of remote file: 77.1 kB
external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/4.png ADDED

Git LFS Details

  • SHA256: 9e07f1fad25d945058f7ad0aca59aa8b94e09944c854b0e9e34044c59eb0c797
  • Pointer size: 131 Bytes
  • Size of remote file: 209 kB
external/BodybuildingPoseClassifier/data/train/bDoubleBiceps/5.png ADDED

Git LFS Details

  • SHA256: 9c2b2af04e222173466077f643b52586554a40bd7c76b25e819f512dfe11b2a6
  • Pointer size: 130 Bytes
  • Size of remote file: 71.3 kB
external/BodybuildingPoseClassifier/data/train/bLatSpread/1.png ADDED

Git LFS Details

  • SHA256: 9cd241f12be1a8cd8d973ea961117b3df1002955c5442ee1ab6b021f9bf685e9
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB
external/BodybuildingPoseClassifier/data/train/bLatSpread/2.png ADDED

Git LFS Details

  • SHA256: ef940b257992544d565ee12c46e52728b63894ebaa0da78d30e57fcdde3c3530
  • Pointer size: 131 Bytes
  • Size of remote file: 266 kB
external/BodybuildingPoseClassifier/data/train/bLatSpread/3.png ADDED

Git LFS Details

  • SHA256: 1420ef2f25068da9cad993ea98ac5f8bde60a60d30a1f957354f2637f7485900
  • Pointer size: 130 Bytes
  • Size of remote file: 77.1 kB
external/BodybuildingPoseClassifier/data/train/bLatSpread/4.png ADDED

Git LFS Details

  • SHA256: 64f651e474091f2371645a609f02234c3130f3a2872840ab9c479e41624173c1
  • Pointer size: 131 Bytes
  • Size of remote file: 209 kB
external/BodybuildingPoseClassifier/data/train/bLatSpread/5.png ADDED

Git LFS Details

  • SHA256: 50c8a7094345d559e0b323d2457aa945baed89070d7bc37a233e5cb2d807b503
  • Pointer size: 130 Bytes
  • Size of remote file: 71.3 kB
external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/1.png ADDED

Git LFS Details

  • SHA256: 8fbd7328135e1613dc1b42da5d284947e7c468fa5dcf8d64132323e74750e983
  • Pointer size: 131 Bytes
  • Size of remote file: 174 kB
external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/2.png ADDED

Git LFS Details

  • SHA256: f52b1b72ba7cb81111f0e607261fa6b351ea99302ba9b39b02758929a39b9eea
  • Pointer size: 130 Bytes
  • Size of remote file: 83.7 kB
external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/3.png ADDED

Git LFS Details

  • SHA256: c342dc95a7baefa6ae21ba70538fa46855adb5cf4bd44f46f17ab354fc17d9f5
  • Pointer size: 131 Bytes
  • Size of remote file: 777 kB
external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/4.png ADDED

Git LFS Details

  • SHA256: 2f047bb89fad39b7dccb037d9087d3ad297836c5b057b0dceaba26b7de21e2d8
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB
external/BodybuildingPoseClassifier/data/train/fDoubleBiceps/5.png ADDED

Git LFS Details

  • SHA256: 1f6312e1a23d81d91e3641bfd48cc65a091bd6d862d5273031c03502dc8265dc
  • Pointer size: 130 Bytes
  • Size of remote file: 27.1 kB
external/BodybuildingPoseClassifier/data/train/fLatSpread/1.png ADDED

Git LFS Details

  • SHA256: f5682d7432c53bece76d7cf356c5c00b24e04caa275bdaf0aad54fa6ed0dcb05
  • Pointer size: 131 Bytes
  • Size of remote file: 301 kB
external/BodybuildingPoseClassifier/data/train/fLatSpread/2.png ADDED

Git LFS Details

  • SHA256: 7d62196cc38e5c53f3bf979a4f1fd0f17f913b43e5024fc9bd83023de6b58b7f
  • Pointer size: 131 Bytes
  • Size of remote file: 170 kB
external/BodybuildingPoseClassifier/data/train/fLatSpread/3.png ADDED

Git LFS Details

  • SHA256: ac4b33cd16d813659a70f86b513904a5b7110a97c21b9b7da36b169c81a86ccb
  • Pointer size: 131 Bytes
  • Size of remote file: 171 kB
external/BodybuildingPoseClassifier/data/train/fLatSpread/4.png ADDED

Git LFS Details

  • SHA256: 5021d8f1f71856cc4f884bdcb3745249902768d6abc3d1001400f0424440bdb0
  • Pointer size: 131 Bytes
  • Size of remote file: 302 kB
external/BodybuildingPoseClassifier/data/train/fLatSpread/5.png ADDED

Git LFS Details

  • SHA256: 51fb2ebaac0f94b103ed46691dc2342e7b1404bbb1ea2b7ad8f1598c0747022c
  • Pointer size: 130 Bytes
  • Size of remote file: 26.1 kB
external/BodybuildingPoseClassifier/data/train/sideChest/1.png ADDED

Git LFS Details

  • SHA256: 3387cccd855266dbb09c94e868d59c237362029d898e4d1747e3e1f861901058
  • Pointer size: 132 Bytes
  • Size of remote file: 1.14 MB
external/BodybuildingPoseClassifier/data/train/sideChest/2.png ADDED

Git LFS Details

  • SHA256: 13dd967d300dfeed38e9e9d2a9f996c3eb60b1b3b1469a9e03a79d4ffc0d0872
  • Pointer size: 131 Bytes
  • Size of remote file: 217 kB
external/BodybuildingPoseClassifier/data/train/sideChest/3.png ADDED

Git LFS Details

  • SHA256: d30c205f65c8f573726c92179ce9bd10f0b68039239e83e06e17f9c41f73dd66
  • Pointer size: 131 Bytes
  • Size of remote file: 416 kB
external/BodybuildingPoseClassifier/data/train/sideChest/4.png ADDED

Git LFS Details

  • SHA256: 66b766735050834d2cca9ea8f88f1e99cc82e6ad34a4d74c6390883f24aed96d
  • Pointer size: 130 Bytes
  • Size of remote file: 35.4 kB
external/BodybuildingPoseClassifier/data/train/sideChest/5.png ADDED

Git LFS Details

  • SHA256: 5c4800143f35e6a26ba72ea60f02817aff262f0499c9c135e7e68f25e6dd6f00
  • Pointer size: 131 Bytes
  • Size of remote file: 892 kB
external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/1.png ADDED

Git LFS Details

  • SHA256: 5440053672ec87fc41e0cb84a06e65530b07089b97e14fd6c03353626199d701
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB
external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/2.png ADDED

Git LFS Details

  • SHA256: 15e9746d1be1ddea281ef00397544ac9c24c4916da457ed031f3d7a887d7c911
  • Pointer size: 131 Bytes
  • Size of remote file: 266 kB
external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/3.png ADDED

Git LFS Details

  • SHA256: a4f7fad1724559c7e8c9e5f194319c53cda8cd4e348637e3dd6eb23613043f08
  • Pointer size: 130 Bytes
  • Size of remote file: 77.1 kB
external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/4.png ADDED

Git LFS Details

  • SHA256: 9e07f1fad25d945058f7ad0aca59aa8b94e09944c854b0e9e34044c59eb0c797
  • Pointer size: 131 Bytes
  • Size of remote file: 209 kB
external/BodybuildingPoseClassifier/data/validation/bDoubleBiceps/5.png ADDED

Git LFS Details

  • SHA256: 9c2b2af04e222173466077f643b52586554a40bd7c76b25e819f512dfe11b2a6
  • Pointer size: 130 Bytes
  • Size of remote file: 71.3 kB
external/BodybuildingPoseClassifier/data/validation/bLatSpread/1.png ADDED

Git LFS Details

  • SHA256: 9cd241f12be1a8cd8d973ea961117b3df1002955c5442ee1ab6b021f9bf685e9
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB
external/BodybuildingPoseClassifier/data/validation/bLatSpread/2.png ADDED

Git LFS Details

  • SHA256: ef940b257992544d565ee12c46e52728b63894ebaa0da78d30e57fcdde3c3530
  • Pointer size: 131 Bytes
  • Size of remote file: 266 kB
external/BodybuildingPoseClassifier/data/validation/bLatSpread/3.png ADDED

Git LFS Details

  • SHA256: 1420ef2f25068da9cad993ea98ac5f8bde60a60d30a1f957354f2637f7485900
  • Pointer size: 130 Bytes
  • Size of remote file: 77.1 kB
external/BodybuildingPoseClassifier/data/validation/bLatSpread/4.png ADDED

Git LFS Details

  • SHA256: 64f651e474091f2371645a609f02234c3130f3a2872840ab9c479e41624173c1
  • Pointer size: 131 Bytes
  • Size of remote file: 209 kB
external/BodybuildingPoseClassifier/data/validation/bLatSpread/5.png ADDED

Git LFS Details

  • SHA256: 50c8a7094345d559e0b323d2457aa945baed89070d7bc37a233e5cb2d807b503
  • Pointer size: 130 Bytes
  • Size of remote file: 71.3 kB
external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/1.png ADDED

Git LFS Details

  • SHA256: 8fbd7328135e1613dc1b42da5d284947e7c468fa5dcf8d64132323e74750e983
  • Pointer size: 131 Bytes
  • Size of remote file: 174 kB
external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/2.png ADDED

Git LFS Details

  • SHA256: f52b1b72ba7cb81111f0e607261fa6b351ea99302ba9b39b02758929a39b9eea
  • Pointer size: 130 Bytes
  • Size of remote file: 83.7 kB
external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/3.png ADDED

Git LFS Details

  • SHA256: c342dc95a7baefa6ae21ba70538fa46855adb5cf4bd44f46f17ab354fc17d9f5
  • Pointer size: 131 Bytes
  • Size of remote file: 777 kB
external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/4.png ADDED

Git LFS Details

  • SHA256: 2f047bb89fad39b7dccb037d9087d3ad297836c5b057b0dceaba26b7de21e2d8
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB
external/BodybuildingPoseClassifier/data/validation/fDoubleBiceps/5.png ADDED

Git LFS Details

  • SHA256: 1f6312e1a23d81d91e3641bfd48cc65a091bd6d862d5273031c03502dc8265dc
  • Pointer size: 130 Bytes
  • Size of remote file: 27.1 kB
external/BodybuildingPoseClassifier/data/validation/fLatSpread/1.png ADDED

Git LFS Details

  • SHA256: f5682d7432c53bece76d7cf356c5c00b24e04caa275bdaf0aad54fa6ed0dcb05
  • Pointer size: 131 Bytes
  • Size of remote file: 301 kB
external/BodybuildingPoseClassifier/data/validation/fLatSpread/2.png ADDED

Git LFS Details

  • SHA256: 7d62196cc38e5c53f3bf979a4f1fd0f17f913b43e5024fc9bd83023de6b58b7f
  • Pointer size: 131 Bytes
  • Size of remote file: 170 kB
external/BodybuildingPoseClassifier/data/validation/fLatSpread/3.png ADDED

Git LFS Details

  • SHA256: ac4b33cd16d813659a70f86b513904a5b7110a97c21b9b7da36b169c81a86ccb
  • Pointer size: 131 Bytes
  • Size of remote file: 171 kB
external/BodybuildingPoseClassifier/data/validation/fLatSpread/4.png ADDED

Git LFS Details

  • SHA256: 5021d8f1f71856cc4f884bdcb3745249902768d6abc3d1001400f0424440bdb0
  • Pointer size: 131 Bytes
  • Size of remote file: 302 kB
external/BodybuildingPoseClassifier/data/validation/fLatSpread/5.png ADDED

Git LFS Details

  • SHA256: 51fb2ebaac0f94b103ed46691dc2342e7b1404bbb1ea2b7ad8f1598c0747022c
  • Pointer size: 130 Bytes
  • Size of remote file: 26.1 kB