For the complete documentation index, see llms.txt. This page is also available as Markdown.

REST API で使う

Serverless Hosted API には、すべてのモデルと Workflows 用の 1 つのエンドポイントがあります:

https://serverless.roboflow.com

HTTP エンドポイント

Legacy Infer From Request

post

Legacy inference endpoint for object detection, instance segmentation, and classification.

Args: background_tasks: (BackgroundTasks) pool of fastapi background tasks dataset_id (str): ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID version_id (str): ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID api_key (Optional[str], default None): Roboflow API Key passed to the model during initialization for artifact retrieval. # Other parameters described in the function signature...

Returns: Union[InstanceSegmentationInferenceResponse, KeypointsDetectionInferenceRequest, ObjectDetectionInferenceResponse, ClassificationInferenceResponse, MultiLabelClassificationInferenceResponse, SemanticSegmentationInferenceResponse, Any]: The response containing the inference results.

パスパラメータ
dataset_idstring必須

ID of a Roboflow dataset corresponding to the model to use for inference OR workspace ID

version_idstring必須

ID of a Roboflow dataset version corresponding to the model to use for inference OR model ID

クエリパラメータ
api_keystring · ヌル許容オプション

Roboflow API Key that will be passed to the model during initialization for artifact retrieval

confidenceany ofオプション

The confidence threshold used to filter out predictions. Pass a float in [0, 1], or "best" to use F1-optimal thresholds from model evaluation, or "default" to use the model's built-in default.

Default: 0.4
numberオプション
または
string · enumオプション可能な値:
keypoint_confidencenumberオプション

The confidence threshold used to filter out keypoints that are not visible based on model confidence

Default: 0
formatstringオプション

One of 'json' or 'image'. If 'json' prediction data is return as a JSON string. If 'image' prediction data is visualized and overlayed on the original input image.

Default: json
imagestring · ヌル許容オプション

The publically accessible URL of an image to use for inference.

image_typestring · ヌル許容オプション

One of base64 or numpy. Note, numpy input is not supported for Roboflow Hosted Inference.

Default: base64
labelsboolean · ヌル許容オプション

If true, labels will be include in any inference visualization.

Default: false
mask_decode_modestring · ヌル許容オプション

One of 'accurate' or 'fast'. If 'accurate' the mask will be decoded using the original image size. If 'fast' the mask will be decoded using the original mask size. 'accurate' is slower but more accurate.

Default: accurate
tradeoff_factornumber · ヌル許容オプション

The amount to tradeoff between 0='fast' and 1='accurate'

Default: 0
max_detectionsintegerオプション

The maximum number of detections to return. This is used to limit the number of predictions returned by the model. The model may return more predictions than this number, but only the top max_detections predictions will be returned.

Default: 300
overlapnumberオプション

The IoU threhsold that must be met for a box pair to be considered duplicate during NMS

Default: 0.3
strokeintegerオプション

The stroke width used when visualizing predictions

Default: 1
disable_preproc_auto_orientboolean · ヌル許容オプション

If true, disables automatic image orientation

Default: false
disable_preproc_contrastboolean · ヌル許容オプション

If true, disables automatic contrast adjustment

Default: false
disable_preproc_grayscaleboolean · ヌル許容オプション

If true, disables automatic grayscale conversion

Default: false
disable_preproc_static_cropboolean · ヌル許容オプション

If true, disables automatic static crop

Default: false
disable_active_learningboolean · ヌル許容オプション

If true, the predictions will be prevented from registration by Active Learning (if the functionality is enabled)

Default: false
active_learning_target_datasetstring · ヌル許容オプション

Parameter to be used when Active Learning data registration should happen against different dataset than the one pointed by model_id

sourcestring · ヌル許容オプション

The source of the inference request

Default: external
source_infostring · ヌル許容オプション

The detailed source information of the inference request

Default: external
response_mask_formatstring · enum · ヌル許容オプション

The format of the prediction mask - polygon (default) or rle - applicable for instance segmentation models.

Default: polygon可能な値:
レスポンス
200

Successful Response

application/json
または
または
または
または
または
または
または
anyオプション
post/{dataset_id}/{version_id}

最終更新

役に立ちましたか?