Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working environment #27

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
*.egg-info
.installed.cfg
*.egg
MANIFEST
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Action Detection for Sign Language
---
This repository houses work that follows a tutorial presented on [YouTube](https://www.youtube.com/watch?v=doDUihpj6ro&t=4444s)
by Nicholas Renotte.

In its current state, the notebooks inside of this repository have been demonstrated to run in their full capacity as
of 23 June 2023.

Because the intended/target audience is probably less saavy, I will be descriptive regarding how to get this running.

In order to follow along, you will want to do the following:

1. Ensure that you have a `python 3.8` environment installed. For example:

```bash
conda create -n your_env_name python=3.8
```

2. Activate that conda environment:

```bash
conda activate your_env_name
```

3. Pip install the repository:

```bash
pip install -e .
```

4. Once this is done, you can run:

```bash
jupyter lab
```

Which will spin up a `jupyter lab` server on your local host, and from there, you should be off and running.

**NOTE**: If it doesn't work immediately, make sure your notebook is using the appropriate conda environment.
It should default to the currently active env.

**NOTES**:


## Some Notes on Notebook Execution
```python
cap = cv2.VideoCapture(0)
```

* This argument may need changed as it the integer values determines which video device to use.
* The code ran on a Windows machine (additional work need for WSL setups), and will likely run on Linux/Mac OS
* The following snippet of code (cell in a notebook), takes time to initialize and will open a video capture window.
In order to stop capture, you must press the `q` key.

```python
cap = cv2.VideoCapture(0)
# Set mediapipe model
with mp_holistic.Holistic(min_detection_confidence=0.5, min_tracking_confidence=0.5) as holistic:
while cap.isOpened():

# Read feed
ret, frame = cap.read()

# Make detections
image, results = mediapipe_detection(frame, holistic)
print(results)

# Draw landmarks
draw_styled_landmarks(image, results)

# Show to screen
cv2.imshow('OpenCV Feed', image)

# Break gracefully
if cv2.waitKey(10) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
```

Large diffs are not rendered by default.

2,640 changes: 1,320 additions & 1,320 deletions Action Detection Tutorial.ipynb → notebooks/Action Detection Tutorial.ipynb

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "adfsl"
authors = [
{ name = "Nicholas Renotte" },
{ name = "Eric Kerecz" },
]

dependencies = [
"opencv-python",
"jupyterlab",
"matplotlib",
"mediapipe",
"numpy",
"opencv-python",
"scikit-learn",
"tensorflow-cpu==2.4.1",
#"tensorflow-gpu=2.4.1",
]
requires-python = ">=3.8"
dynamic = ["version"]

[project.urls]
Soruce = "https://github.com/nicknochnack/ActionDetectionforSignLanguage"
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from setuptools import setup

setup()
1 change: 1 addition & 0 deletions src/ActionDetectionforSignLanguage/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__="0.0.1"