Skip to content

Conversation

@LeeJc02
Copy link
Contributor

@LeeJc02 LeeJc02 commented Oct 26, 2025

新添加两个目标识别模型,删除了典型应用中关于npu模型的重复部分,修正部分英文文档

Signed-off-by: LeeJc02 [email protected]

Summary by Sourcery

Overhaul and standardize the documentation: reorganize and internationalize installation guides, eliminate redundant pages, and introduce new step-by-step tutorials for YOLOv5 and YOLOX model deployment on the board’s NPU.

New Features:

  • Add YOLOv5 and YOLOX object detection tutorials for NPU model deployment on Lichee Pi 4A

Enhancements:

  • Revamp installation guides for Lichee Pi 4A (Linux and Windows) and Milk-V Meles with consistent formatting, download link tables, warnings, and notes
  • Consolidate environment and tooling sections, clean up duplicated content, and standardize headings and images across docs

Documentation:

  • Remove outdated typical-applications entries for BERT, MobileNetV2, and YOLOX; update intro and issue submission pages with U-Boot reset instructions and refined guidance
  • Correct English in various documentation files and improve overall readability

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 26, 2025

Reviewer's Guide

This PR overhauls the documentation by adding two new object detection tutorials for YOLOv5 and YOLOX under the NPU section, removing redundant typical-application pages, and comprehensively refactoring the installation guides for Lichee Pi 4A (Linux and Windows) and Milk-V Meles. It also refines the NPU environment setup guide and updates index and issue pages to standardize formatting, add clear warnings/notes, and improve overall coherence.

Class diagram for documentation structure after refactor

classDiagram
    class InstallationGuide {
      +sidebar_position
      +title
      +description
      +sections: Preparation, SD Card, eMMC, Troubleshooting
    }
    class ObjectDetectionTutorial {
      +title
      +description
      +sections: ExampleCode, ModelAcquisition, Conversion, Compilation, Execution, Results
    }
    class NPUEnvironmentSetup {
      +title
      +description
      +sections: BoardSetup, SHLInstall, HHBInstall, DriverConfig
    }
    class IndexPage {
      +title
      +description
      +table: SupportedDevices, DownloadLinks, GuideLinks
    }
    class LicheePi4A_Linux
    class LicheePi4A_Windows
    class MilkVMeles
    class YOLOv5
    class YOLOX
    class LicheePi4A_NPU
    class InstallationIntro
    class MainIntro
    class IssuePage
    InstallationGuide <|-- LicheePi4A_Linux
    InstallationGuide <|-- LicheePi4A_Windows
    InstallationGuide <|-- MilkVMeles
    ObjectDetectionTutorial <|-- YOLOv5
    ObjectDetectionTutorial <|-- YOLOX
    NPUEnvironmentSetup <|-- LicheePi4A_NPU
    IndexPage <|-- InstallationIntro
    IndexPage <|-- MainIntro
    IndexPage <|-- IssuePage
Loading

Flow diagram for NPU environment setup and model deployment

flowchart TD
    A["Start: User wants to run object detection on Lichee Pi 4A"]
    B["Complete NPU environment setup"]
    C["Install SHL library and dependencies"]
    D["Clone example code (YOLOv5/YOLOX)"]
    E["Download/export ONNX model"]
    F["Convert model with HHB (CPU/NPU)"]
    G["Compile post-processing code (if needed)"]
    H["Transfer files to device"]
    I["Run inference and view results"]
    A --> B --> C --> D --> E --> F --> G --> H --> I
Loading

File-Level Changes

Change Details Files
Add object detection tutorials for YOLOv5 and YOLOX
  • Create CPU/NPU walkthroughs for YOLOv5
  • Create CPU/NPU walkthroughs for YOLOX
  • Provide acquisition, conversion, compilation, and execution steps
docs/npu/lpi4a/object-detection/yolov5.mdx
docs/npu/lpi4a/object-detection/yolox.mdx
i18n/en/docusaurus-plugin-content-docs/current/npu/lpi4a/object-detection/yolov5.mdx
i18n/en/docusaurus-plugin-content-docs/current/npu/lpi4a/object-detection/yolox.mdx
Remove outdated typical-application pages
  • Delete BERT-on-NPU, MobileNetV2, YOLOX deployment guides
  • Remove corresponding i18n English duplicates
docs/typical-applications/bert-on-npu.md
docs/typical-applications/mobilenetv2-image-classification.md
docs/typical-applications/yolox-deployment.md
i18n/en/docusaurus-plugin-content-docs/current/typical-applications/bert-on-npu.md
i18n/en/docusaurus-plugin-content-docs/current/typical-applications/mobilenetv2-image-classification.md
i18n/en/docusaurus-plugin-content-docs/current/typical-applications/yolox-deployment.md
Refactor installation guides for Lichee Pi 4A and Milk-V Meles
  • Reorganize Linux and Windows workflows with unified tables, warnings, and notes
  • Standardize tool installation (wget, zstd, fastboot) and flashing steps
  • Harmonize Milk-V Meles guide structure and admonitions
i18n/en/docusaurus-plugin-content-docs/current/Installation/licheepi4a.mdx
i18n/en/docusaurus-plugin-content-docs/current/Installation/licheepi4a-windows.mdx
i18n/en/docusaurus-plugin-content-docs/current/Installation/milkv-meles.mdx
Enhance NPU environment setup guide
  • Clarify x86 build requirement and virtual environment usage
  • Update SHL and HHB-onnxruntime installation steps and library path settings
  • Include kernel module and device permission guidance
i18n/en/docusaurus-plugin-content-docs/current/npu/lpi4a/env.mdx
Update index, introduction, and issue pages
  • Revise flashing guide availability table and reset‐env warning
  • Standardize RevyOS project description and image download instructions
  • Refine issue submission tips and contact channels
i18n/en/docusaurus-plugin-content-docs/current/Installation/intro.mdx
i18n/en/docusaurus-plugin-content-docs/current/intro.mdx
i18n/en/docusaurus-plugin-content-docs/current/issue.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • This PR is very large and touches many docs—consider splitting it into smaller, focused changes (e.g., core install guide updates vs. new model tutorials) to simplify review.
  • Please verify and update all cross‐document links and sidebar/navigation entries so the newly added YOLOv5 and YOLOX pages are discoverable and no broken references remain.
  • I noticed varying terminology in headings (e.g., “Installation Guide” vs “Flashing Guide”)—a quick consistency pass on key terms across all docs would improve cohesion.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- This PR is very large and touches many docs—consider splitting it into smaller, focused changes (e.g., core install guide updates vs. new model tutorials) to simplify review.
- Please verify and update all cross‐document links and sidebar/navigation entries so the newly added YOLOv5 and YOLOX pages are discoverable and no broken references remain.
- I noticed varying terminology in headings (e.g., “Installation Guide” vs “Flashing Guide”)—a quick consistency pass on key terms across all docs would improve cohesion.

## Individual Comments

### Comment 1
<location> `i18n/en/docusaurus-plugin-content-docs/current/Installation/licheepi4a.mdx:298-301` </location>
<code_context>
+If no version info is printed, install `fastboot`:

 ```bash
 sudo apt install fastboot
 ```

-![fastboot-install](/img/image-for-flash/zstd-install.png)
-
-```bash
-sudo apt install fastboot 
-```
-
-#### Install Serial Console Tool
+![fastboot-install](/img/image-for-flash/fastboot-install.png)

-When using a serial connection, a serial console tool is required for monitoring. There are many serial console tools available, such as `minicom`, `screen`, and `picocom`. In this guide, we will use `minicom` for demonstration.
</code_context>

<issue_to_address>
**nitpick:** The fastboot installation screenshot is reused from zstd installation.

Please verify that `/img/image-for-flash/fastboot-install.png` accurately depicts the fastboot installation process.
</issue_to_address>

### Comment 2
<location> `i18n/en/docusaurus-plugin-content-docs/current/Installation/licheepi4a.mdx:345-347` </location>
<code_context>
-sudo wget u-boot-with-spl-lpi4a-16g-main.bin
-sudo wget boot-lpi4a-20250110_151339.ext4.zst
-sudo wget root-lpi4a-20250110_151339.ext4.zst
+sudo wget https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250110/u-boot-with-spl-lpi4a-16g-main.bin
+sudo wget https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250110/boot-lpi4a-20250110_151339.ext4.zst
+sudo wget https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250110/root-lpi4a-20250110_151339.ext4.zst
</code_context>

<issue_to_address>
**suggestion:** The use of `sudo wget` may be unnecessary for downloading files.

Using `sudo` with `wget` can result in downloaded files being owned by root. Remove `sudo` unless elevated permissions are required for the destination directory.

```suggestion
wget https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250110/u-boot-with-spl-lpi4a-16g-main.bin
wget https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250110/boot-lpi4a-20250110_151339.ext4.zst
wget https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250110/root-lpi4a-20250110_151339.ext4.zst
```
</issue_to_address>

### Comment 3
<location> `i18n/en/docusaurus-plugin-content-docs/current/Installation/milkv-meles.mdx:180-185` </location>
<code_context>
-```bash
-wget https://fast-mirror.isrc.ac.cn/revyos/extra/images/meles/20250323/sdcard-meles-20250323_154525.img.zst
-```
+- [RevyOS 20240720 (Kernel 5.10)](https://mirror.iscas.ac.cn/revyos/extra/images/meles/20240720/)
+- Latest release (Kernel 6.6): {<DownloadLink device="Milk-V Meles" />}

-This file is a .zst compressed package, which needs to be decompressed after downloading. You can use the zstd tool to decompress it.
</code_context>

<issue_to_address>
**suggestion:** The download links for images do not specify which file to choose.

Please indicate the specific filename users should download, such as those starting with `sdcard-`, to avoid confusion.

```suggestion
To install RevyOS, download the SD card image file for your device.  
**Choose the file whose name starts with `sdcard-meles-` from the following links:**

- [RevyOS 20240720 (Kernel 5.10)](https://mirror.iscas.ac.cn/revyos/extra/images/meles/20240720/) (look for files named `sdcard-meles-*.img.zst`)
- Latest release (Kernel 6.6): {<DownloadLink device="Milk-V Meles" />} (select the `sdcard-meles-*.img.zst` file)

```
</issue_to_address>

### Comment 4
<location> `i18n/en/docusaurus-plugin-content-docs/current/Installation/intro.mdx:30` </location>
<code_context>
-
+| Supported Device   | Image Download (Latest Version) | Flashing Guide |
+| ------------------ | ------------------------------- | -------------- |
+| Lichee Pi 4A       | {<DownloadLink device="Lichee Pi 4A" />}       | {<RedirectBasedOnUA windowsLink="../licheepi4a-windows/" otherLink="../licheepi4a/" description="Flashing Guide" /> } |
+| Milk-V Meles       | {<DownloadLink device="Milk-V Meles" />}       | [Milk-V official flashing guide](https://milkv.io/zh/docs/meles/installation) |
+| Milk-V Pioneer     | {<DownloadLink device="Milk-V Pioneer" />}     | [Flashing Guide](../milkv-pioneer/) |
</code_context>

<issue_to_address>
**suggestion:** The table mixes English and Chinese guide links for Milk-V Meles.

Please add an English-language guide for Milk-V Meles or indicate in the table that the current guide is in Chinese.

```suggestion
| Milk-V Meles       | {<DownloadLink device="Milk-V Meles" />}       | [Milk-V official flashing guide (Chinese)](https://milkv.io/zh/docs/meles/installation) <br /> English guide coming soon |
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant