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

[Feat] - Add Sitemap Feature for the Docs #170

Merged
merged 3 commits into from
Sep 13, 2023
Merged
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
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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved

## 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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved

```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`.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved

```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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved

```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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved
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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved

## 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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved

```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`.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved

```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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved
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.
adithyaakrishna marked this conversation as resolved.
Show resolved Hide resolved
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