-
Notifications
You must be signed in to change notification settings - Fork 6
Documentation update #36
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e09ca26
Updating documentation. Adding installation instructions. Fixing li…
robotrapta c48f33d
Updating docs link on readme.
robotrapta f3e1023
Tweaking docs URL on readme.
robotrapta 05d0514
Linking SDK to Pypi.
robotrapta cf8a268
Bumping SDK version to improve pypi README.
robotrapta d3dff9b
Rewording subheading
robotrapta b48d2a4
De-pinking the reliability image.
robotrapta 723a765
Switching back to main branch for docs.
robotrapta f984015
Switching branches around.
robotrapta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,3 +166,5 @@ node_modules/ | |
|
|
||
| *.swp | ||
| **/.python-version | ||
|
|
||
| .DS_Store | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "label": "Installation", | ||
| "position": 3, | ||
| "link": { | ||
| "type": "generated-index", | ||
| "description": "Installing on various platforms" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Numpy, PIL, OpenCV - using common libraries | ||
|
|
||
| ## Smaller is better! | ||
|
|
||
| Groundlight is optimized to run on small edge devices. As such, you can use the Groundlight SDK without | ||
| installing large libraries like `numpy` or `PIL` or `OpenCV`. | ||
|
|
||
| But if you're already installing them, we'll use them. Our SDK detects if these libraries are installed | ||
| and will make use of them if they're present. If not, we'll gracefully degrade, and tell you what's | ||
| wrong if you try to use these features. | ||
|
|
||
| ## Numpy | ||
|
|
||
| The Groundlight SDK can accept images as `numpy` arrays. They should be in the standard HWN format in RGB color order. | ||
| Pixel values should be from 0-255 (not 0.0-1.0 as floats). SO `uint8` data type is preferable since it saves memory. | ||
|
|
||
| Here's sample code to create an 800x600 random image in numpy: | ||
|
|
||
| ``` | ||
| import numpy as np | ||
|
|
||
| img = np_img = np.random.uniform(0, 255, (600, 800, 3)) | ||
| ``` | ||
|
|
||
| ## PIL | ||
|
|
||
| The Groundlight SDK can accept PIL images directly in `submit_image_query`. | ||
|
|
||
|
|
||
| ## OpenCV | ||
|
|
||
| OpenCV creates images that are stored as numpy arrays. So can send them to `submit_image_query` directly. | ||
| <b>BUT!</b> OpenCV uses BGR color order, not RGB. You can reverse them as follows: | ||
|
|
||
| ``` | ||
| rgb_img = bgr_img[:, :, ::-1] | ||
| ``` | ||
|
|
||
| See [Issue #34](https://github.com/groundlight/python-sdk/issues/34) for a discussion about OpenCV support. | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Windows, Linux, Mac | ||
|
|
||
| Installation on common platforms is simple. Just get `python3`, `pip`, and you're ready to go. | ||
|
|
||
| ## Python 3.7 or newer | ||
|
|
||
| Groundlight's SDK supports Python 3.7 - 3.11. | ||
|
|
||
| ## Install the library | ||
|
|
||
| Make sure you have the latest version by running: | ||
|
|
||
| ``` | ||
| pip3 install groundlight --upgrade | ||
| ``` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Raspberry Pi and NVIDIA Jetson | ||
|
|
||
| Groundlight's SDK works great on ARM devices like Raspberry Pi and NVIDIA Jetson. | ||
|
|
||
| ``` | ||
| pip3 install groundlight | ||
| ``` | ||
|
|
||
| an ARM-compatible version will automatically get installed. | ||
|
|
||
| ## Streams | ||
|
|
||
| If you have `docker` installed on your Pi, you can even just run | ||
|
|
||
| ``` | ||
| docker run groundlight/stream | ||
| ``` | ||
|
|
||
| as we publish an ARM version of our streaming application to dockerhub. | ||
|
|
6 changes: 2 additions & 4 deletions
6
...uilding-applications/installation-faqs.md → docs/docs/installation/ubuntu-18.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I do like them!