Ascend Samples

repository·master·Indexed 41 days ago

https://github.com/ascend/samples

Practical implementation examples of the Ascend Computing Language (AscendCL) APIs. This repository provides guidance on managing hardware resources, executing models, and processing media data on Ascend AI Processors using C++ and Python, including implementations for FsDet (Few-Shot Object Detection) and Detectron2 model deployment.

Tokens
345.4K
Snippets
925
Records
1.4K
Agent score
49%

What's inside Ascend Samples

  1. Overview of BERT Text Classification Sample

    master

    This sample demonstrates how to use a BERT model to perform text classification using the Ascend AI Software Stack.

    • Function: Classifies input text into specific categories.
    • Input: Text strings intended for classification.
    • Output: The predicted text type (e.g., sports, health, military, education, or automobile).

    Note: This sample is for reference and learning purposes only and is not intended for commercial use.

  2. Overview of YOLOV3_coco_detection_picture_with_freetype Sample

    master

    This sample uses a YOLOv3 model to perform object detection and inference on input JPG images. The results are printed onto output YUV images using the FreeType library for text rendering.

    • Input: Source JPG image.
    • Output: YUV image containing the inference results (bounding boxes and labels).
  3. Overview of 3D Action Recognition Sample

    master

    The 3D Action Recognition sample uses a 3DCNN model to perform classification inference on video data. It utilizes the video2bin script to convert video files into a compatible data format. The output provides the confidence scores for 10 different actions.

    Note: This sample is for reference and learning the Ascend AI Software Stack; it is not for commercial use. This guide covers CLI mode only. For MindStudio instructions, refer to the official wiki.

  4. Overview of the Text Recognition C++ Sample

    master

    This sample demonstrates how to use a text recognition model to recognize printed English letters from video input provided by cameras.

    • Input: Video containing printed English letters.
    • Output: Inference results displayed on the Presenter Server WebUI.

    Note: This sample is for reference and learning the Ascend AI Software Stack; it is not intended for commercial use.

  5. Overview of the Text Recognition Sample

    master

    The Text Recognition sample uses a text recognition model to identify printed English letters from images provided via a camera input.

    • Input: Video containing printed English letters.
    • Output: Inference results displayed via the presenter interface.

    Prerequisites:

    • CANN Version: >= 5.0.4
    • Hardware: Atlas 200DK or Atlas 300 (tested).
    • Third-party Dependencies: presentagent, ffmpeg, and acllite (refer to the environment guide for installation).
  6. Overview of sampleResnetRtsp

    master

    This sample demonstrates how to use live555 to create an RTSP stream as input data. It enables acllite to decode the RTSP stream, perform image scaling, and use a ResNet50 network for inference. The final output classifies each frame of the RTSP stream and displays the TOP1 category confidence and corresponding category information on the screen.

    Input: RTSP stream. Output: Display of TOP1 category label, confidence value, and category information.

  7. Overview of DIY 200DK RC Car Projects

    master

    This repository provides four distinct DIY projects for building a toy car platform powered by the Atlas 200 DK. All projects are based on the Elegoo Smart Robot Car Kit or its equivalents.

    These projects demonstrate different ways to control an RC car using AI models (handpose, bodypose, object detection, etc.) and various hardware interfaces (I2C, UART, Bluetooth, UDP).

  8. Overview of Presenter Server and Agent

    master

    The Presenter system is used to display inference results on a Linux server (where Mind Studio is located) via a web browser. It consists of two components:

    1. Presenter Server: A Python 3-based package using the tornado web framework and protobuf. It receives data from the Agent and displays it in a browser. It supports Image mode (single images) and Video mode (continuous image streams). It uses channels to distinguish data sources (e.g., image and video).
    2. Presenter Agent: Provides a set of APIs that allow users to push media messages (currently supporting JPEG) to the Presenter Server.