Skip to content

Commit

Permalink
[Feat] - Add Sitemap Feature for the Docs (#170)
Browse files Browse the repository at this point in the history
* Fixed formatting issues

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>

* Added Sitemap Config

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>

* Updated Sitemap Config

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>

---------

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
  • Loading branch information
adithyaakrishna authored Sep 13, 2023
1 parent 7552161 commit 256c116
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 37 deletions.
16 changes: 4 additions & 12 deletions docs/develop/rust/wasinn/mediapipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ sidebar_position: 1

# Mediapipe solutions

Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files
and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides
Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process
or manipulate the media data based on the AI output.
Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process or manipulate the media data based on the AI output.

## Prerequisite

Expand Down Expand Up @@ -63,10 +60,7 @@ DetectionResult:

## Understand the code

The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source.
All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions
required to pre- and post-process data for the model. For example, we can create an `detector` instance
using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.
The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source. All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions required to pre- and post-process data for the model. For example, we can create an `detector` instance using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.

```rust
let model_data: &[u8] = include_bytes!("mobilenetv2_ssd_256_uint8.tflite");
Expand All @@ -75,17 +69,15 @@ let detector = ObjectDetectorBuilder::new()
.build_from_buffer(model_data)?;
```

The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model,
and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.
The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model, and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.

```rust
let mut input_img = image::open(img_path)?;
let detection_result = detector.detect(&input_img)?;
println!("{}", detection_result);
```

Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example,
the `draw_detection()` utility function draws the data in `detection_result` onto the input image.
Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example, the `draw_detection()` utility function draws the data in `detection_result` onto the input image.

```rust
draw_detection(&mut input_img, &detection_result);
Expand Down
2 changes: 1 addition & 1 deletion docs/start/usage/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Featuring AOT compiler optimization, WasmEdge is one of the fastest WebAssembly

- WasmEdge applications can be plugged into existing application frameworks or platforms.

If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.
If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.
43 changes: 32 additions & 11 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ const config = {
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
},
}),
],
],
Expand Down Expand Up @@ -172,13 +178,16 @@ const config = {
{
label: 'Getting Started',
to: '/start/overview',
}, {
},
{
label: 'Develop',
to: '/develop/overview',
}, {
},
{
label: 'Embeds',
to: '/embed/overview',
}, {
},
{
label: 'Contribute',
to: '/contribute/overview',
}
Expand All @@ -189,18 +198,26 @@ const config = {
{
label: 'Github',
href: 'https://github.com/WasmEdge/WasmEdge',
}, {
},
{
label: 'Second State',
href: 'https://www.secondstate.io/',
}, {
},
{
label: 'Articles & Blog',
href: 'https://www.secondstate.io/articles/'
}, {
},
{
label: 'WasmEdge Talks',
to: '/talks'
}, {
},
{
label: 'Releases',
to: '/releases'
},
{
label: 'Sitemap',
href: 'https://wasmedge.org/docs/sitemap.xml'
}
],
},
Expand All @@ -210,16 +227,20 @@ const config = {
{
label: 'Mailing List',
href: 'https://groups.google.com/g/wasmedge/'
}, {
},
{
label: 'Discord',
href: 'https://discord.gg/U4B5sFTkFc',
}, {
},
{
label: 'Twitter',
href: 'https://twitter.com/realwasmedge',
}, {
},
{
label: 'Slack #WasmEdge',
href: 'https://cloud-native.slack.com/archives/C0215BBK248'
}, {
},
{
label: 'Community Meeting',
href: 'https://docs.google.com/document/d/1iFlVl7R97Lze4RDykzElJGDjjWYDlkI8Rhf8g4dQ5Rk/edit?usp=sharing'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ sidebar_position: 1

# Mediapipe solutions

Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files
and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides
Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process
or manipulate the media data based on the AI output.
Mediapipe is a collection of highly popular AI models developed by Google. They focus on intelligent processing of media files and streams. The `mediapipe-rs` crate is a Rust library for data processing using the Mediapipe suite of models. The crate provides Rust APIs to pre-process the data in media files or streams, run AI model inference to analyze the data, and then post-process or manipulate the media data based on the AI output.

## Prerequisite

Expand Down Expand Up @@ -63,10 +60,7 @@ DetectionResult:

## Understand the code

The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source.
All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions
required to pre- and post-process data for the model. For example, we can create an `detector` instance
using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.
The [main.rs](https://github.com/juntao/demo-object-detection/blob/main/src/main.rs) is the complete example Rust source. All `mediapipe-rs` APIs follow a common pattern. A Rust struct is designed to work with a model. It contains functions required to pre- and post-process data for the model. For example, we can create an `detector` instance using the builder pattern, which can build from any "object detection" model in the Mediapipe model library.

```rust
let model_data: &[u8] = include_bytes!("mobilenetv2_ssd_256_uint8.tflite");
Expand All @@ -75,17 +69,15 @@ let detector = ObjectDetectorBuilder::new()
.build_from_buffer(model_data)?;
```

The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model,
and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.
The `detect()` function takes in an image, pre-processes it into a tensor array, runs inference on the mediapipe object detection model, and the post-processes the returned tensor array into a human redable format stored in the `detection_result`.

```rust
let mut input_img = image::open(img_path)?;
let detection_result = detector.detect(&input_img)?;
println!("{}", detection_result);
```

Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example,
the `draw_detection()` utility function draws the data in `detection_result` onto the input image.
Furthermore, the `mediapipe-rs` crate provides additional utility functions to post-process the data. For example, the `draw_detection()` utility function draws the data in `detection_result` onto the input image.

```rust
draw_detection(&mut input_img, &detection_result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Featuring AOT compiler optimization, WasmEdge is one of the fastest WebAssembly

- WasmEdge applications can be plugged into existing application frameworks or platforms.

If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.
If you have any great ideas on WasmEdge, don't hesitate to open a GitHub issue to discuss together.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"dependencies": {
"@docusaurus/core": "^2.4.0",
"@docusaurus/plugin-google-gtag": "^2.4.1",
"@docusaurus/plugin-sitemap": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.0",
"@docusaurus/theme-mermaid": "^2.4.1",
"@easyops-cn/docusaurus-search-local": "^0.35.0",
Expand Down

0 comments on commit 256c116

Please sign in to comment.