diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..df14513 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.py] +charset = utf-8 +indent_style = space +indent_size = 4 \ No newline at end of file diff --git a/README.md b/README.md index b90c27f..1a0b343 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,177 @@ + +# ASL - Research [![Badge License]][License] + +*American Sign Language Recognition* + +
+ +``` Michael Mongelli Dr. Salgian American Sign Language Recognition Apr 1 2020 +``` + +
+ +## Overview + +This program is capable of plotting a **3D Hand Figure**
+based on coordinates provided by a **CSV** file. + +The CSV comes from the **Mendely Dataset** of
+recorded **American Sign Language** gestures. + +
+ +--- + +
+ +## Requirements + +To run the program, you require: + +- **[Python 3]** + +- Some modules: + + - `pandas` + - `numpy` + - `matplotlib` + +
+ + Install them with: + + ```sh + pip install pandas numpy matplotlib + ``` + +
+ +--- + +
+ +## Usage + +*The program is used in the command line.* + +```sh +Plot.py +``` + +
+ +### Mode + +#### Line + +*This is the default used if no mode is specified.* + +Plot the connections between the joints as lines. + +```sh +Plot.py line +``` + +
+ +#### Scatter + +Plot the hand using a scatter plot,
+showing the joints as points. + +```sh +Plot.py scatter +``` + +
+ +--- + +
+ +## Notes + +### update_plot() + +Notice that the title is set using a different
+technique for the scatter and line plots. + +Scatter and line plots behave differently in **MatPlotLib**. + + +This is also why the `ax.cla()` (clear axes) function
+is present in the line plot but not in the scatter plot. + +Further research is needed to find if their is a way to
+implement the plotting of these graphs in as similar
+a manner as possible. + +
+ +### placement of plt.show() + +Unfortunately, this has to come last. + +While it is suboptimal for the user to have to wait
+for the animation to render for saving before they
+can view it in a popup window, doing so corrupts
+the animation-saving process. + +There may be a solution to this, but
+this can be solved in the future. + +
+ +--- + +
+ +## Future Work + +- Be able to pass multiple csv files to the program to
+ make creating multiple animations at once less tedious + + * It would be good to add more detail
+ to the progress report in this case + + * The process of creating and saving the animation
+ is currently very slow, so a status report indicates
+ if the animation is `10%` ... `20%` ... etc until completion + + * If the program is made able to convert multiple files
+ to animations at once, it would be good to show the
+ user approximately when the animations will be done
+ rendering so they know how long they will need to
+ leave their terminal running + +- Make it possible to enable / disable the plot being shown + + * If one simply wants to save several animations created
+ from their CSVs, they shouldn't have to see it all pop up
+ in multiple plot window + +- Improve speed + + * Line mode is currently very slow, could be sped up by
+ saving all plot data so it doesn't have to be recalculated
+ with each loop of the animation + + * There could be ways to speed up
+ the process of the first loop as well + +- Be able to plot points and lines at the same time + + * Will greatly improve the viewer's ability to
+ interpret the signs being performed by hand + + + +[Python 3]: https://www.python.org/downloads/ + +[Badge License]: https://img.shields.io/badge/License-Unkown-darkgray?style=for-the-badge -hand_plotter.py Information - -Overview: - - This program is capable of plotting a hand figure in 3D based on - coordinates provided from a CSV file in the Mendely dataset of - recorded American Sign Language gestures. - -Command line args: - - $ handfile.csv plot_mode - - handfile.csv = the file containing the coordinates you would like to plot - - plot_mode = * (optional, set to 'line' by default) - * 'scatter' - plot the hand using a scatter plot, showing the joints as points - * 'line' - plot the connections between the joints as lines - - Examples: $ python3 hand_plotter.py Work_Right.csv scatter - $ python3 hand_plotter.py Work_Right.csv line - $ python3 hand_plotter.py Work_Right.csv - -Notes: - - In update_plot(): - Notice that the title is set using a different technique for the scatter and line plots. - Scatter and line plots behave differently in MatPlotLib. - This is also why the ax.cla() (clear axes) function is present in the line plot - but not in the scatter plot. - Further research is needed to find if their is a way to implement - the plotting of these graphs in as similar a manner as possible. - - placement of plt.show(): - Unfortunately, this has to come last. - While it is suboptimal for the user to have to wait - for the animation to render for saving before they - can view it in a popup window, - doing so corrupts the animation-saving process. - There may be a solution to this, - but this can be solved in the future. - -Future Work: - - * Be able to pass multiple csv files to the program to make creating - multiple animations at once less tedious - * It would be good to add more detail to the progress report - in this case - * The process of creating and saving the animaiton is currently - very slow, so a status report indicates if the animation is - 10%...20%...etc until completion - * If the program is made able to convert multiple files to - animations at once, it would be good to show the user approximately - when the animations will be done rendering so they know how long - they will need to leave their terminal running - - * Make it possible to enable/disable the plot being shown - * If one simply wants to save several animations created from - their CSVs, they shouldn't have to see it all pop up in - multiple plot windows - - * Improve speed: - * Line mode is currently very slow, could be sped up by saving - all plot data so it doesnt have to be recalculated with each loop - of the animation - * There could be ways to speed up the process of the first loop as well - - * Be able to plot points and lines at the same time - * Will greatly improve the viewer's ability to interpret the signs - being performed by the hand +[License]: # diff --git a/hand_plotter.py b/Source/Plot.py old mode 100644 new mode 100755 similarity index 99% rename from hand_plotter.py rename to Source/Plot.py index 1977f1c..81b7e40 --- a/hand_plotter.py +++ b/Source/Plot.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import pandas as pd import numpy as np import sys diff --git a/Test/Example.sh b/Test/Example.sh new file mode 100755 index 0000000..89a312a --- /dev/null +++ b/Test/Example.sh @@ -0,0 +1,10 @@ +#!/bin/sh + + +# Make this file work from any pwd +folder=$(dirname "$0") + +alias plot="$folder/../Source/Plot.py" +csv="$folder/Work_Right.csv" + +plot $csv line \ No newline at end of file diff --git a/Work_Right.csv b/Test/Work_Right.csv similarity index 100% rename from Work_Right.csv rename to Test/Work_Right.csv diff --git a/Work_Right_line.mp4 b/Test/Work_Right_line.mp4 similarity index 100% rename from Work_Right_line.mp4 rename to Test/Work_Right_line.mp4 diff --git a/Work_Right_scatter.mp4 b/Test/Work_Right_scatter.mp4 similarity index 100% rename from Work_Right_scatter.mp4 rename to Test/Work_Right_scatter.mp4 diff --git a/example_output.jpeg b/Test/example_output.jpeg similarity index 100% rename from example_output.jpeg rename to Test/example_output.jpeg