Skip to content

Latest commit

 

History

History
81 lines (50 loc) · 3.54 KB

1.1-QuickStarted.md

File metadata and controls

81 lines (50 loc) · 3.54 KB

Getting Started

  1. Download the MaaFramework Release
  2. Prepare Resource Files
  3. Use a Generic CLI or Write Integration Code

Download the MaaFramework Release

Download and extract the MaaFramework release that matches your platform: Releases

Prepare Resource Files

You need to prepare some resource files with the typical file structure as follows:

my_resource
├── image
│   ├── my_image_1.png
│   └── my_image_2.png
├── model
│   └── ocr
│       ├── det.onnx
│       ├── keys.txt
│       └── rec.onnx
└── pipeline
    ├── my_pipeline_1.json
    └── my_pipeline_2.json

You can modify the names of files and folders starting with "my_", but the others have fixed file names and should not be changed. Here's a breakdown:

Pipeline JSON Files

The files in my_resource/pipeline contain the main script execution logic and recursively read all JSON format files in the directory.

You can refer to the Task Pipeline Protocol for writing these files. You can find a simple demo for reference.

Tools:

Image Files

The files in my_resource/image are primarily used for template matching images, feature detection images, and other images required by the pipeline. They are read based on the template and other fields specified in the pipeline.

Tools:

Text Recognition Model Files

The files in my_resource/model/ocr are ONNX models obtained from PaddleOCR after conversion.

You can use our pre-converted files: MaaCommonAssets. Choose the language you need and store them according to the directory structure mentioned above in Prepare Resource Files.

If needed, you can also fine-tune the official pre-trained models of PaddleOCR yourself (please refer to the official PaddleOCR documentation) and convert them to ONNX files for use. You can find conversion commands here.

Run

You can integrate MaaFramework using MaaPiCli (Generic CLI) or by writing integration code yourself.

Using MaaPiCli

Use MaaPiCli in the bin folder of the Release package, and write interface.json and place it in the same directory to use it.

The Cli has completed basic function development, and more functions are being continuously improved! Detailed documentation needs to be further improved. Currently, you can refer to sample to write it.

Examples:

Writing Integration Code Yourself

Please refer to the Integration Documentation.

Examples:

  • M9A - Integration practice based on C++ & cmake
  • MBA - Integration practice based on C# .NET