-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add a bonsai guide page to the SLEAP website #1785
Conversation
WalkthroughThe recent changes introduce a new branch trigger for the GitHub workflow and add comprehensive documentation for using Bonsai with SLEAP. The updates include a new guide on exporting SLEAP models, installing Bonsai, and employing Bonsai SLEAP modules for prediction and analysis, along with a new section in the documentation index. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 4
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
docs/_static/bonsai-workflow.jpg
is excluded by!**/*.jpg
Files selected for processing (3)
- .github/workflows/website.yml (1 hunks)
- docs/guides/bonsai.md (1 hunks)
- docs/guides/index.md (2 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/website.yml
Additional context used
LanguageTool
docs/guides/index.md
[uncategorized] ~19-~19: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...e project as your original training data and you want to correct some of the predict...
[uncategorized] ~21-~21: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...ough with the frame-by-frame predictions but you need to correct the identities trac...
[uncategorized] ~25-~25: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...ave a project with labeled training data and you'd like to run training or inference...
[uncategorized] ~27-~27: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...en you have a project with training data and you want to train on a different machin...
[uncategorized] ~31-~31: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...emote-inference` when you trained models and you want to run inference on a differen...
[style] ~31-~31: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing. (REP_WANT_TO_VB)
Context: ...erence` when you trained models and you want to run inference on a different machine us...
[style] ~35-~35: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing. (REP_WANT_TO_VB)
Context: ...EAP with Bonsai {ref}bonsai
when you want to analyze the trained SLEAP model to visu...docs/guides/bonsai.md
[style] ~12-~12: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...down and top-down-id SLEAP models. ::: In order to import the trained model into Bonsai, w...
[typographical] ~19-~19: Consider adding a comma here. (PLEASE_COMMA)
Context: ...exported_model ``` (for further details please refer {ref}sleap-export
docs for more...
[uncategorized] ~27-~27: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...stallation.html). - Add the necessary packages including theBonsai.SLEAP
and `Bonsa...
[misspelling] ~33-~33: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...application. - The workflow must have an source moduleFileCapture
which can b...
Markdownlint
docs/guides/bonsai.md
36-36: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
37-37: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
25-25: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
31-31: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
15-15: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
49-49: null (MD047, single-trailing-newline)
Files should end with a single newline character
Additional comments not posted (2)
docs/guides/index.md (1)
33-36
: The addition of the "SLEAP with Bonsai" section is clear and well-integrated into the existing structure.Tools
LanguageTool
[style] ~35-~35: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing. (REP_WANT_TO_VB)
Context: ...EAP with Bonsai {ref}bonsai
when you want to analyze the trained SLEAP model to visu...docs/guides/bonsai.md (1)
43-47
: The description and visualization of the Bonsai workflow are effectively presented.
docs/guides/bonsai.md
Outdated
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | ||
::: | ||
|
||
In order to import the trained model into Bonsai, we need to export the model using the {code}`sleap-export` cli command to convert the trained model to a Protocol buffer(.pb) format. For example, for the top-down-id model, the command is as follows: |
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.
Consider using a more concise phrase to improve readability.
- In order to import the trained model into Bonsai, we need to export the model using the {code}`sleap-export` cli command to convert the trained model to a Protocol buffer(.pb) format.
+ To import the trained model into Bonsai, export it using the {code}`sleap-export` cli command to convert it to a Protocol buffer (.pb) format.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
In order to import the trained model into Bonsai, we need to export the model using the {code}`sleap-export` cli command to convert the trained model to a Protocol buffer(.pb) format. For example, for the top-down-id model, the command is as follows: | |
To import the trained model into Bonsai, export it using the {code}`sleap-export` cli command to convert it to a Protocol buffer (.pb) format. For example, for the top-down-id model, the command is as follows: |
docs/guides/bonsai.md
Outdated
- Install bonsai by following the instructions provided in their [installation page](https://bonsai-rx.org/docs/articles/installation.html). | ||
|
||
- Add the necessary packages including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules. For more information on other dependency installations, please refer to the official [bonsai sleap documentation](https://github.com/bonsai-rx/sleap?tab=readme-ov-file#bonsai---sleap). |
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.
Correct typographical issues for better readability.
- Install bonsai by following the instructions provided in their [installation page](https://bonsai-rx.org/docs/articles/installation.html).
+ Install bonsai by following the instructions provided on their [installation page](https://bonsai-rx.org/docs/articles/installation.html).
- Add the necessary packages including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules.
+ Add the necessary packages, including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages, for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- Install bonsai by following the instructions provided in their [installation page](https://bonsai-rx.org/docs/articles/installation.html). | |
- Add the necessary packages including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules. For more information on other dependency installations, please refer to the official [bonsai sleap documentation](https://github.com/bonsai-rx/sleap?tab=readme-ov-file#bonsai---sleap). | |
- Install bonsai by following the instructions provided on their [installation page](https://bonsai-rx.org/docs/articles/installation.html). | |
- Add the necessary packages, including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages, for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules. For more information on other dependency installations, please refer to the official [bonsai sleap documentation](https://github.com/bonsai-rx/sleap?tab=readme-ov-file#bonsai---sleap). |
Tools
LanguageTool
[uncategorized] ~27-~27: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...stallation.html). - Add the necessary packages including theBonsai.SLEAP
and `Bonsa...
Markdownlint
25-25: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
docs/guides/bonsai.md
Outdated
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. | ||
|
||
- For the top-down model, | ||
- To predict the centroids, add the `PredictCentroid` module and provide the path to the training config JSON file for the centroid model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | ||
- To predict the instances, add the `PredictPoses` module and provide the path to the training config JSON file for the centered instance model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | ||
|
||
- For the top-down-id model, to predict the instances with identities, add `PredictPoseIdentities` module and provide the path to the training config JSON file for the top-down-id model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. |
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.
Correct markdown formatting issues to adhere to standards.
- - The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor.
+ - The workflow must have a source module `FileCapture` which can be found in the toolbox search in the workflow editor.
- - To predict the centroids, add the `PredictCentroid` module and provide the path to the training config JSON file for the centroid model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module.
+ - To predict the centroids, add the `PredictCentroid` module and provide the path to the training config JSON file for the centroid model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. | |
- For the top-down model, | |
- To predict the centroids, add the `PredictCentroid` module and provide the path to the training config JSON file for the centroid model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | |
- To predict the instances, add the `PredictPoses` module and provide the path to the training config JSON file for the centered instance model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | |
- For the top-down-id model, to predict the instances with identities, add `PredictPoseIdentities` module and provide the path to the training config JSON file for the top-down-id model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | |
- The workflow must have a source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. | |
- For the top-down model, | |
- To predict the centroids, add the `PredictCentroid` module and provide the path to the training config JSON file for the centroid model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | |
- To predict the instances, add the `PredictPoses` module and provide the path to the training config JSON file for the centered instance model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | |
- For the top-down-id model, to predict the instances with identities, add `PredictPoseIdentities` module and provide the path to the training config JSON file for the top-down-id model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. |
Tools
LanguageTool
[misspelling] ~33-~33: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...application. - The workflow must have an source moduleFileCapture
which can b...
Markdownlint
36-36: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
37-37: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
docs/guides/bonsai.md
Outdated
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | ||
::: | ||
|
||
In order to import the trained model into Bonsai, we need to export the model using the {code}`sleap-export` cli command to convert the trained model to a Protocol buffer(.pb) format. For example, for the top-down-id model, the command is as follows: |
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 order to import the trained model into Bonsai, we need to export the model using the {code}`sleap-export` cli command to convert the trained model to a Protocol buffer(.pb) format. For example, for the top-down-id model, the command is as follows: | |
Before we can import a trained model into Bonsai, we need to use the {code}`sleap-export` command to convert the model to a format supported by Bonsai. For example, for the top-down-id model, the command is as follows: |
docs/guides/bonsai.md
Outdated
**Exporting a SLEAP trained model:** | ||
|
||
:::{note} | ||
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | ||
::: |
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.
Flip flop
**Exporting a SLEAP trained model:** | |
:::{note} | |
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | |
::: | |
:::{note} | |
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | |
::: | |
**Exporting a SLEAP trained model:** |
docs/guides/bonsai.md
Outdated
sleap-export -m centroid_model_folder_path -m top_down_id_model_folder_path exported_model | ||
``` | ||
|
||
(for further details please refer {ref}`sleap-export` docs for more details.) |
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.
(for further details please refer {ref}`sleap-export` docs for more details.) | |
. Please refer to the {ref}`sleap-export` docs for more details on using the command. |
docs/guides/bonsai.md
Outdated
|
||
(for further details please refer {ref}`sleap-export` docs for more details.) | ||
|
||
This will generate the necessary `.pb` file and other information files to be used in Bonsai in the `exported_model` folder. |
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.
This will generate the necessary `.pb` file and other information files to be used in Bonsai in the `exported_model` folder. | |
This will generate the necessary `.pb` file and other information files required by Bonsai. In this example, these files were saved to the specified `exported_model` folder. |
docs/guides/bonsai.md
Outdated
- Install bonsai by following the instructions provided in their [installation page](https://bonsai-rx.org/docs/articles/installation.html). | ||
|
||
- Add the necessary packages including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules. For more information on other dependency installations, please refer to the official [bonsai sleap documentation](https://github.com/bonsai-rx/sleap?tab=readme-ov-file#bonsai---sleap). |
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.
- Install bonsai by following the instructions provided in their [installation page](https://bonsai-rx.org/docs/articles/installation.html). | |
- Add the necessary packages including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules. For more information on other dependency installations, please refer to the official [bonsai sleap documentation](https://github.com/bonsai-rx/sleap?tab=readme-ov-file#bonsai---sleap). | |
1. Install Bonsai. See the [Bonsai installation instructions](https://bonsai-rx.org/docs/articles/installation.html). | |
2. Download the necessary packages for Bonsai to run with SLEAP. See the official [Bonsai SLEAP documentation](https://github.com/bonsai-rx/sleap?tab=readme-ov-file#bonsai---sleap) for more information. |
docs/guides/bonsai.md
Outdated
|
||
Bonsai is a visual language for reactive programming and currently supports SLEAP models. | ||
|
||
**Exporting a SLEAP trained model:** |
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.
**Exporting a SLEAP trained model:** | |
### Exporting a SLEAP trained model |
docs/guides/bonsai.md
Outdated
|
||
This will generate the necessary `.pb` file and other information files to be used in Bonsai in the `exported_model` folder. | ||
|
||
**Installing Bonsai and necessary packages:** |
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.
**Installing Bonsai and necessary packages:** | |
### Installing Bonsai and necessary packages |
docs/guides/bonsai.md
Outdated
|
||
- Add the necessary packages including the `Bonsai.SLEAP` and `Bonsai.SLEAP.Design` packages for SLEAP to run with Bonsai and to access the SLEAP-Bonsai modules. For more information on other dependency installations, please refer to the official [bonsai sleap documentation](https://github.com/bonsai-rx/sleap?tab=readme-ov-file#bonsai---sleap). | ||
|
||
**Using Bonsai SLEAP modules:** |
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.
**Using Bonsai SLEAP modules:** | |
### Using Bonsai SLEAP modules |
docs/guides/bonsai.md
Outdated
|
||
**Using Bonsai SLEAP modules:** | ||
|
||
Once you have Bonsai installed with the required packages, you should be able to open the bonsai application. |
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.
Once you have Bonsai installed with the required packages, you should be able to open the bonsai application. | |
Once you have Bonsai installed with the required packages, you should be able to open the Bonsai application. |
docs/guides/bonsai.md
Outdated
- For the top-down model, | ||
- To predict the centroids, add the `PredictCentroid` module and provide the path to the training config JSON file for the centroid model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | ||
- To predict the instances, add the `PredictPoses` module and provide the path to the training config JSON file for the centered instance model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. |
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.
Instead of bullets, lets make each of these sections. Also maybe we can split up the long bullets into multiple sentences.
- For the top-down model, | |
- To predict the centroids, add the `PredictCentroid` module and provide the path to the training config JSON file for the centroid model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | |
- To predict the instances, add the `PredictPoses` module and provide the path to the training config JSON file for the centered instance model in the `ModelFileName` field and the path to the `exported_model` folder containing the `.pb` file in the `TrainingConfig` field of the module. | |
#### Top-down model | |
The top-down model requires both the `PredictCentroid` and the `PredictPoses` modules. | |
The `PredictCentroid` module will predict the centroids of detections. There are two fields inside the `PredictCentroid` module: the `ModelFileName` field and the `TrainingConfig` field. The `ModelFileName` field expects the path to the training config JSON file for the centroid model. The `TrainingConfig` field expects the path to the `exported_model` folder (which contains the exported `.pb` file). | |
The `PredictPoses` module will predict the instances of detections. Similar to the `PredictCentroid` module, there are two fields inside the `PredictPoses` module: the `ModelFileName` field and the `TrainingConfig` field. The `ModelFileName` field expects the path to the training config JSON file for the centered instance model. The `TrainingConfig` field expects the path to the `exported_model` folder (which contains the exported `.pb` file). |
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.
Actionable comments posted: 7
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- docs/guides/bonsai.md (1 hunks)
Additional context used
LanguageTool
docs/guides/bonsai.md
[misspelling] ~33-~33: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...pplication. - The workflow must have an source moduleFileCapture
which can b...
Markdownlint
docs/guides/bonsai.md
11-11: Expected: h2; Actual: h3 (MD001, heading-increment)
Heading levels should only increment by one level at a time
25-25: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
48-48: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
35-35: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
42-42: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
45-45: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
15-15: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
55-55: null (MD047, single-trailing-newline)
Files should end with a single newline character
docs/guides/bonsai.md
Outdated
|
||
Before we can import a trained model into Bonsai, we need to use the {code}`sleap-export` command to convert the model to a format supported by Bonsai. For example, for the top-down-id model, the command is as follows: | ||
|
||
``` |
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.
Specify the language for fenced code blocks.
- ```
+ ```bash
Tools
Markdownlint
15-15: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
#### Single instance model: | ||
The `PredictSinglePose` module will predict the poses for single instance models. This module also has two fields: the `ModelFileName` field and the `TrainingConfig` field. The `TrainingConfig` field expects the path to the training config JSON file for the single instance model. The `ModelFileName` field expects the path to the `exported_model` folder (which contains the exported `.pb` file). | ||
|
||
|
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.
Avoid multiple consecutive blank lines.
-
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
48-48: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
docs/guides/bonsai.md
Outdated
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | ||
::: | ||
|
||
### Exporting a SLEAP trained model: |
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.
Ensure heading levels increment by one level at a time.
- ### Exporting a SLEAP trained model:
+ ## Exporting a SLEAP trained model:
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
### Exporting a SLEAP trained model: | |
## Exporting a SLEAP trained model: |
Tools
Markdownlint
11-11: Expected: h2; Actual: h3 (MD001, heading-increment)
Heading levels should only increment by one level at a time
docs/guides/bonsai.md
Outdated
|
||
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. | ||
|
||
#### Top-down model: |
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.
Ensure headings are surrounded by blank lines.
- The top-down model requires both the `PredictCentroid` and the `PredictPoses` modules.
+
+ The top-down model requires both the `PredictCentroid` and the `PredictPoses` modules.
+
- The `PredictPoseIdentities` module will predict the instances with identities.
+
+ The `PredictPoseIdentities` module will predict the instances with identities.
+
- The `PredictSinglePose` module will predict the poses for single instance models.
+
+ The `PredictSinglePose` module will predict the poses for single instance models.
+
Also applies to: 42-42, 45-45
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
35-35: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
docs/guides/bonsai.md
Outdated
|
||
Once you have Bonsai installed with the required packages, you should be able to open the Bonsai application. | ||
|
||
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. |
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.
Correct grammatical error in the article usage.
- The workflow must have an source module `FileCapture`
+ The workflow must have a source module `FileCapture`
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. | |
- The workflow must have a source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. |
Tools
LanguageTool
[misspelling] ~33-~33: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...pplication. - The workflow must have an source moduleFileCapture
which can b...
docs/guides/bonsai.md
Outdated
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | ||
::: | ||
|
||
### Exporting a SLEAP trained model: |
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.
Remove the ":"
### Exporting a SLEAP trained model: | |
### Exporting a SLEAP trained model |
docs/guides/bonsai.md
Outdated
|
||
### Exporting a SLEAP trained model: | ||
|
||
Before we can import a trained model into Bonsai, we need to use the {code}`sleap-export` command to convert the model to a format supported by Bonsai. For example, for the top-down-id model, the command is as follows: |
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.
"For example, for the top-down-id model" is a bit weird sounding
docs/guides/bonsai.md
Outdated
|
||
Before we can import a trained model into Bonsai, we need to use the {code}`sleap-export` command to convert the model to a format supported by Bonsai. For example, for the top-down-id model, the command is as follows: | ||
|
||
``` |
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.
``` | |
```bash |
docs/guides/bonsai.md
Outdated
Before we can import a trained model into Bonsai, we need to use the {code}`sleap-export` command to convert the model to a format supported by Bonsai. For example, for the top-down-id model, the command is as follows: | ||
|
||
``` | ||
sleap-export -m centroid_model_folder_path -m top_down_id_model_folder_path exported_model |
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.
emulate the path for paths:
sleap-export -m centroid_model_folder_path -m top_down_id_model_folder_path exported_model | |
sleap-export -m centroid/model/folder/path -m top_down_id/model/folder/path exported_model |
docs/guides/bonsai.md
Outdated
|
||
Once you have Bonsai installed with the required packages, you should be able to open the Bonsai application. | ||
|
||
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. |
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.
Make into paragraph
docs/guides/bonsai.md
Outdated
|
||
Once you have Bonsai installed with the required packages, you should be able to open the Bonsai application. | ||
|
||
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. |
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.
Add screenshots of what FileCapture
is and how to add it
docs/guides/bonsai.md
Outdated
#### Top-down model: | ||
The top-down model requires both the `PredictCentroid` and the `PredictPoses` modules. | ||
|
||
The `PredictCentroid` module will predict the centroids of detections. There are two fields inside the `PredictCentroid` module: the `ModelFileName` field and the `TrainingConfig` field. The `TrainingConfig` field expects the path to the training config JSON file for the centroid model. The `ModelFileName` field expects the path to the `exported_model` folder (which contains the exported `.pb` file). |
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.
Add screenshots of what PredictCentroid is and how to add it
docs/guides/bonsai.md
Outdated
|
||
The `PredictCentroid` module will predict the centroids of detections. There are two fields inside the `PredictCentroid` module: the `ModelFileName` field and the `TrainingConfig` field. The `TrainingConfig` field expects the path to the training config JSON file for the centroid model. The `ModelFileName` field expects the path to the `exported_model` folder (which contains the exported `.pb` file). | ||
|
||
The `PredictPoses` module will predict the instances of detections. Similar to the `PredictCentroid` module, there are two fields inside the `PredictPoses` module: the `ModelFileName` field and the `TrainingConfig` field. The `TrainingConfig` field expects the path to the training config JSON file for the centered instance model. The `ModelFileName` field expects the path to the `exported_model` folder (which contains the exported `.pb` file). |
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.
Add screenshots of what PredictPoses is and how to add it
docs/guides/bonsai.md
Outdated
|
||
![Bonsai.SLEAP workflow](../_static/bonsai-workflow.jpg) | ||
|
||
- Once you have the basic workflow for Bonsai.SLEAP created and running successfully, you can add more modules to analyze and visualize the results in Bonsai. |
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.
remove bullet
docs/guides/bonsai.md
Outdated
|
||
- The workflow must have an source module `FileCapture` which can be found in the toolbox search in the workflow editor. Provide the path to the video that was used to train the SLEAP model in the `FileName` field of the module. | ||
|
||
#### Top-down model: |
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.
Remove the ":"
#### Top-down model: | |
#### Top-down model |
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.
Actionable comments posted: 7
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (5)
docs/_static/bonsai-connection.jpg
is excluded by!**/*.jpg
docs/_static/bonsai-filecapture.jpg
is excluded by!**/*.jpg
docs/_static/bonsai-predictcentroids.jpg
is excluded by!**/*.jpg
docs/_static/bonsai-predictposeidentities.jpg
is excluded by!**/*.jpg
docs/_static/bonsai-predictposes.jpg
is excluded by!**/*.jpg
Files selected for processing (1)
- docs/guides/bonsai.md (1 hunks)
Additional context used
LanguageTool
docs/guides/bonsai.md
[grammar] ~66-~66: The verb “Right-click” is spelled with a hyphen. (CLICK_HYPHEN)
Context: ...thfolder. ### Connecting the modules Right click on the
FileCapture` module and select ...
[uncategorized] ~75-~75: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...e green start button to run the workflow and you can add more modules to analyze and...
Markdownlint
docs/guides/bonsai.md
11-11: Expected: h2; Actual: h3 (MD001, heading-increment)
Heading levels should only increment by one level at a time
35-35: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
67-67: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
47-47: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
58-58: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
63-63: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
66-66: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
25-25: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
77-77: null (MD047, single-trailing-newline)
Files should end with a single newline character
|
||
The `exported/model/path` folder will have a structure like the following: | ||
|
||
``` |
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.
Specify the language for fenced code blocks.
- ```
+ ```plaintext
Tools
Markdownlint
25-25: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
Currently Bonsai supports only single instance, top-down and top-down-id SLEAP models. | ||
::: | ||
|
||
### Exporting a SLEAP trained model |
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.
Ensure heading levels increment by one level at a time.
- ### Exporting a SLEAP trained model
+ ## Exporting a SLEAP trained model
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
### Exporting a SLEAP trained model | |
## Exporting a SLEAP trained model |
Tools
Markdownlint
11-11: Expected: h2; Actual: h3 (MD001, heading-increment)
Heading levels should only increment by one level at a time
|
||
![Bonsai FileCapture module](../_static/bonsai-filecapture.jpg) | ||
|
||
#### Top-down model |
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.
Ensure headings are surrounded by blank lines.
- The top-down model requires both the `PredictCentroids` and the `PredictPoses` modules.
+
+ The top-down model requires both the `PredictCentroids` and the `PredictPoses` modules.
+
- The `PredictPoseIdentities` module will predict the instances with identities.
+
+ The `PredictPoseIdentities` module will predict the instances with identities.
+
- The `PredictSinglePose` module will predict the poses for single instance models.
+
+ The `PredictSinglePose` module will predict the poses for single instance models.
+
- Right click on the `FileCapture` module and select **Create Connection**. Now click on the required SLEAP module to complete the connection.
+
+ Right click on the `FileCapture` module and select **Create Connection**. Now click on the required SLEAP module to complete the connection.
+
Also applies to: 58-58, 63-63, 66-66
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
47-47: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
|
||
![Bonsai.SLEAP workflow](../_static/bonsai-workflow.jpg) | ||
|
||
Now you can click the green start button to run the workflow and you can add more modules to analyze and visualize the results in Bonsai. |
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.
Use a comma before 'and' in a compound sentence.
- Now you can click the green start button to run the workflow and you can add more modules to analyze and visualize the results in Bonsai.
+ Now you can click the green start button to run the workflow, and you can add more modules to analyze and visualize the results in Bonsai.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Now you can click the green start button to run the workflow and you can add more modules to analyze and visualize the results in Bonsai. | |
Now you can click the green start button to run the workflow, and you can add more modules to analyze and visualize the results in Bonsai. |
Tools
LanguageTool
[uncategorized] ~75-~75: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...e green start button to run the workflow and you can add more modules to analyze and...
#### Single instance model | ||
The `PredictSinglePose` module will predict the poses for single instance models. This module also has two fields: the `ModelFileName` field and the `TrainingConfig` field. The `TrainingConfig` field expects the path to the training config JSON file for the single instance model. The `ModelFileName` field expects the path to the `frozen_graph.pb` file in the `exported/model/path` folder. | ||
|
||
### Connecting the modules |
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.
Correct the spelling of "Right-click".
- Right click on the `FileCapture` module and select **Create Connection**.
+ Right-click on the `FileCapture` module and select **Create Connection**.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
### Connecting the modules | |
### Connecting the modules | |
Right-click on the `FileCapture` module and select **Create Connection**. |
Tools
LanguageTool
[grammar] ~66-~66: The verb “Right-click” is spelled with a hyphen. (CLICK_HYPHEN)
Context: ...thfolder. ### Connecting the modules Right click on the
FileCapture` module and select ...
Markdownlint
66-66: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
|
||
Now you can click the green start button to run the workflow and you can add more modules to analyze and visualize the results in Bonsai. | ||
|
||
For more documentation on various modules and workflows, please refer to the [official Bonsai docs](https://bonsai-rx.org/docs/articles/editor.html). |
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.
Ensure the file ends with a single newline character.
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
For more documentation on various modules and workflows, please refer to the [official Bonsai docs](https://bonsai-rx.org/docs/articles/editor.html). | |
For more documentation on various modules and workflows, please refer to the [official Bonsai docs](https://bonsai-rx.org/docs/articles/editor.html). | |
Tools
Markdownlint
77-77: null (MD047, single-trailing-newline)
Files should end with a single newline character
|
||
### Installing Bonsai and necessary packages | ||
|
||
1. Install Bonsai. See the [Bonsai installation instructions](https://bonsai-rx.org/docs/articles/installation.html). |
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.
Remove trailing spaces.
- 1. Install Bonsai. See the [Bonsai installation instructions](https://bonsai-rx.org/docs/articles/installation.html).
+ 1. Install Bonsai. See the [Bonsai installation instructions](https://bonsai-rx.org/docs/articles/installation.html).
- Right click on the `FileCapture` module and select **Create Connection**. Now click on the required SLEAP module to complete the connection.
+ Right click on the `FileCapture` module and select **Create Connection**. Now click on the required SLEAP module to complete the connection.
Also applies to: 67-67
Committable suggestion was skipped due to low confidence.
Tools
Markdownlint
35-35: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
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.
Looks good, just remove branch name from the website workflow
.github/workflows/website.yml
Outdated
@@ -9,6 +9,7 @@ on: | |||
- main | |||
- develop | |||
- fakebranch | |||
- shrivaths/bonsai-guide |
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.
- shrivaths/bonsai-guide |
Suceeded by: |
Description
Currently we do not have a page that helps in understanding on how to use Bonsai and SLEAP together for analysis. So, adding a Bonsai guide page to the website for a guidance on using SLEAP models in Bonsai.
Types of changes
Does this address any currently open issues?
Outside contributors checklist
Thank you for contributing to SLEAP!
❤️
Summary by CodeRabbit
New Features
Documentation