Metadata-Version: 2.4
Name: physiocore
Version: 0.2.7
Summary: A physiotherapy exercise toolkit with movement scripts, utilities, and resources.
Author-email: Pankaj Maurya <pankajmaurya@gmail.com>
License: Apache License  
        Version 2.0, January 2004  
        http://www.apache.org/licenses/  
        
        TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  
        
        Copyright 2025 Pankaj Kumar Maurya  
        
        Licensed under the Apache License, Version 2.0 (the "License");  
        you may not use this file except in compliance with the License.  
        You may obtain a copy of the License at  
        
            http://www.apache.org/licenses/LICENSE-2.0  
        
        Unless required by applicable law or agreed to in writing, software  
        distributed under the License is distributed on an "AS IS" BASIS,  
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
        See the License for the specific language governing permissions and  
        limitations under the License.
        
        
Project-URL: Homepage, https://github.com/pankajmaurya/PhysioPlus
Project-URL: Repository, https://github.com/pankajmaurya/PhysioPlus
Keywords: physiotherapy,exercise,movement,rehab
Requires-Python: <=3.10.18,>=3.10.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: mediapipe==0.10.21
Requires-Dist: opencv-python<4.12
Requires-Dist: opencv-contrib-python<4.12
Requires-Dist: numpy<2
Requires-Dist: playsound==1.2.2
Requires-Dist: pyobjc; sys_platform == "darwin"
Dynamic: license-file

# Computer vision based exercise tracker
- Uses mediapipe and opencv-python
- Use python 3.10.18
- Why? https://www.python.org/downloads/release/python-31018/ is last release of 3.10 as of Aug 2025
- Will be supported till Oct 2026
- https://ai.google.dev/edge/mediapipe/solutions/setup_python says we can use upto 3.12 now, so I will soon upgrade 

# publish new version
```sh
rm -rf dist build src/physiocore.egg-info
python -m build
twine upload --repository testpypi dist/*
```

# installation
```sh
pip install physiocore
```

Only if we are trying to install from testpypi (bleeding edge releases will be done here)
```sh
python3.10 -m venv testinstall-0.2.2  ; source testinstall-0.2.2/bin/activate
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple physiocore
```

# upgrade from existing installation
```sh
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple physiocore==0.2.4
```

# Versioning
- last testing on Ankle toe movement done on Mac Sequoia 15.6, physiocore==0.2.2

# Usage Guide
```py
from physiocore.ankle_toe_movement import AnkleToeMovementTracker
tracker = AnkleToeMovementTracker()
tracker.start()

from physiocore.cobra_stretch import CobraStretchTracker
tracker = CobraStretchTracker()
tracker.start()

from physiocore.bridging import BridgingTracker
tracker = BridgingTracker()
tracker.start()

#Similar imports for Straight leg raise and prone straight leg raise
from physiocore.any_prone_straight_leg_raise import AnyProneSLRTracker

from physiocore.any_straight_leg_raise import AnySLRTracker
```
# Testing, Usage 
```
python demo.py --save_video bridging.avi --debug

Contents of demo.py below:
from physiocore.bridging import BridgingTracker
tracker = BridgingTracker()
tracker.start()


(testinstall-0.2.2) ➜  TestPhysioPlus python demo.py
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1754933487.157762 3414708 gl_context.cc:369] GL version: 2.1 (2.1 Metal - 89.4), renderer: Apple M4 Pro
Downloading model to /Users/pankaj/TechCareer/TestPhysioPlus/testinstall-0.2.2/lib/python3.10/site-packages/mediapipe/modules/pose_landmark/pose_landmark_heavy.tflite
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
W0000 00:00:1754933487.193762 3415496 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
W0000 00:00:1754933487.201640 3415498 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
I0000 00:00:1754933491.431292 3414708 gl_context.cc:369] GL version: 2.1 (2.1 Metal - 89.4), renderer: Apple M4 Pro
Settings are --debug False, --video None, --render_all False --save_video None --lenient_mode True --fps 30
W0000 00:00:1754933491.482758 3415548 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
W0000 00:00:1754933491.508220 3415557 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
W0000 00:00:1754933539.888523 3415552 landmark_projection_calculator.cc:186] Using NORM_RECT without IMAGE_DIMENSIONS is only supported for the square ROI. Provide IMAGE_DIMENSIONS or use PROJECTION_MATRIX.
time for raise 1754933545.1654909
time for raise 1754933546.743605
time for raise 1754933562.706252
time for raise 1754933565.942921
time for raise 1754933567.60865
time for raise 1754933574.3253388
time for raise 1754933575.041138
time for raise 1754933575.435921
time for raise 1754933576.240452
time for raise 1754933576.639755
time for raise 1754933603.21583
time for raise 1754933628.344631
time for raise 1754933629.984603
time for raise 1754933630.3845131
Final count: 3
```

See demo.py in tests
