Skip to main content

QJ Python SDK

Project description

py-qj-robots

简体中文 | EN

QJ Robots Python SDK provides powerful machine vision perception capabilities, supporting object detection, image segmentation, attribute description, angle prediction, keypoint detection, and grasp point prediction for 2D/3D images.

Requirements

  • Python 3.x
  • Dependencies: requests>=2.26.0, python-dotenv>=0.19.0

Installation

pip install py-qj-robots

Configuration

The following environment variables need to be configured before using the SDK:

  • QJ_APP_ID: Application ID
  • QJ_APP_SECRET: Application Secret

You can click here to obtain your Application ID and Secret.

You can configure these variables in two ways:

  1. Create a .env file:
QJ_APP_ID=your_app_id
QJ_APP_SECRET=your_app_secret
  1. Using export command:
export QJ_APP_ID=your_app_id
export QJ_APP_SECRET=your_app_secret

Quick Start

from dotenv import load_dotenv
from py_qj_robots import Perception
import os

# Load environment variables
load_dotenv()

# Initialize Perception instance
perception = Perception()

# Perform 2D image detection
result = perception.check_image(
    image_type="2D",
    image_url="http://example.com/image.jpg",
    object_names=["bottle", "cup"]
)
print(f"Detection result: {result}")

API Documentation

Perception Class

check_image

Detect target objects in the image.

def check_image(image_type: str, image_url: str, object_names: Union[str, List[str]], depth_url: Optional[str] = None) -> Dict

Parameters:

  • image_type: Image type, '2D' or '3D'
  • image_url: Image URL
  • object_names: Names of objects to detect, can be a string or list of strings
  • depth_url: Depth image URL (required only when image_type is '3D')

split_image

Segment target objects in the image.

def split_image(image_type: str, image_url: str, object_names: Union[str, List[str]], depth_url: Optional[str] = None) -> Dict

Return value includes:

  • boxes: Bounding box coordinates [x1,y1,x2,y2]
  • masks: Mask image URLs and data
  • croppedImagesListBbox: Cropped image URLs
  • labels: Detected object labels
  • scores: Confidence scores

props_describe

Get attribute descriptions of objects in the image.

def props_describe(image_type: str, image_url: str, object_names: Union[str, List[str]], questions: Union[str, List[str]], depth_url: Optional[str] = None) -> Dict

angle_prediction

Predict object angles.

def angle_prediction(image_type: str, image_url: str, object_names: Union[str, List[str]], depth_url: Optional[str] = None) -> Dict

key_point_prediction

Predict object keypoints.

def key_point_prediction(image_type: str, image_url: str, object_names: Union[str, List[str]], depth_url: Optional[str] = None) -> Dict

grab_point_prediction

Predict object grasp points.

def grab_point_prediction(image_type: str, image_url: str, object_names: Union[str, List[str]], depth_url: Optional[str] = None) -> Dict

full_perception

Perform complete perception analysis, including all features.

def full_perception(image_type: str, image_url: str, object_names: Union[str, List[str]], questions: Union[str, List[str]], depth_url: Optional[str] = None) -> Dict

Return value includes all perception results:

  • angles: Angle information
  • boxes: Bounding boxes
  • masks: Segmentation masks
  • points: Keypoints
  • grasps: Grasp points
  • answers: Attribute descriptions
  • etc.

More Information

Visit QJ Robots Official Website for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_qj_robots-0.1.13.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_qj_robots-0.1.13-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file py_qj_robots-0.1.13.tar.gz.

File metadata

  • Download URL: py_qj_robots-0.1.13.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for py_qj_robots-0.1.13.tar.gz
Algorithm Hash digest
SHA256 4a0a737c2ee1253800c35f2b5795fdb32cdb4b4d0f24acee709870ce3b777b60
MD5 11c6877a89ae3cd1e65b40a12290accb
BLAKE2b-256 5afd6daaa00a19a1cd6e2fc4cefc6c8b9d14bae2d86daddcbba73b51259df503

See more details on using hashes here.

File details

Details for the file py_qj_robots-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: py_qj_robots-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for py_qj_robots-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 d628c86544cd88263fb624db628d5175f5678ea8f46a4ebf49f02fe6b567ceba
MD5 c6618da58b50c505e14f5b7dcdda0c72
BLAKE2b-256 cc5a36d15d60d5b5a91d3e56332ca4f31e419deda108ec6ed483e3832a28e5e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page