qr코드감지 종류
QR 코드 감지 예측.
QR 코드 감지를 사용한 예측
데이터 표현
외부
외부 데이터 표현은 Workflows 클라이언트와 관련이 있으며, 데이터의 입력 및 출력 형식을 규정합니다.
유형: dict
내부
내부 데이터 표현은 Workflows 블록 제작자와 관련이 있습니다 - 이는 실행 엔진이 런타임에 이러한 종류의 입력을 받는 블록에 제공하는 유형입니다.
유형: sv.Detections
세부 정보
이 종류는 QR 코드의 위치와 제공하는 데이터에 관한 예측 묶음을 나타냅니다.
예시:
sv.Detections(
xyxy=array([
[ 865, 153.5, 1189, 422.5],
[ 192.5, 77.5, 995.5, 722.5],
[ 194, 82, 996, 726],
[ 460, 333, 704, 389]]
),
mask=None,
confidence=array([ 1.0, 1.0, 1.0, 1.0]),
class_id=array([2, 7, 2, 0]),
tracker_id=None,
data={
'class_name': array(['qr_code', 'qr_code', 'qr_code', 'qr_code'], dtype='<U13')
'detection_id': array([
'51dfa8d5-261c-4dcb-ab30-9aafe9b52379', 'c0c684d1-1e30-4880-aedd-29e67e417264'
'8cfc543b-9cfe-493b-b5ad-77afed7bee83', 'c0c684d1-1e30-4880-aedd-38e67e441454'
], dtype='<U36'),
'parent_id': array(['image.[0]', 'image.[0]', 'image.[0]', 'image.[0]'], dtype='<U9'),
'image_dimensions': array([[425, 640], [425, 640], [425, 640], [425, 640]]),
'inference_id': array([
'51dfa8d5-261c-4dcb-ab30-9aafe9b52379', 'c0c684d1-1e30-4880-aedd-29e67e417264'
'8cfc543b-9cfe-493b-b5ad-77afed7bee83', 'c0c684d1-1e30-4880-aedd-38e67e441454'
], dtype='<U36'),
'prediction_type': array([
'qrcode-detection', 'qrcode-detection',
'qrcode-detection', 'qrcode-detection'
], dtype='<U16'),
'root_parent_id': array(['image.[0]', 'image.[0]', 'image.[0]', 'image.[0]'], dtype='<U9'),
'root_parent_coordinates': array([[0, 0], [0, 0], [0, 0], [0, 0]]),
'root_parent_dimensions': array([[425, 640], [425, 640], [425, 640], [425, 640]]),
'parent_coordinates': array([[0, 0], [0, 0], [0, 0], [0, 0]]),
'parent_dimensions': array([[425, 640], [425, 640], [425, 640], [425, 640]]),
'scaling_relative_to_parent': array([1, 1, 1, 1]),
'scaling_relative_to_root_parent': array([1, 1, 1, 1]),
'data': np.array(['qr-code-1-data', 'qr-code-2-data', 'qr-code-3-data', 'qr-code-4-data'])
}
)보시다시피, 우리는 의해 유지되는 예측용 표준 메타데이터 세트를 확장했습니다 supervision. 이 메타데이터를 추가하는 것은 다음의 블록과의 호환성을 보장하기 위해 필요합니다 roboflow_core plugin.
메타데이터 설계는 최적이 아닙니다(전체 이미지에 관한 메타데이터가 모든 바운딩 박스에 걸쳐 중복되고, 빈 예측에 대한 메타데이터를 저장하는 방법이 없습니다). 우리는 GH 이슈 를 통해 이 문제를 전달했습니다.
추가 필드의 세부 사항:
detection_id- 각 감지에 대한 고유 식별자로, 특정 감지를 기반으로 종속 요소가 생성될 때 사용됩니다(예: Dynamic Crop은 새 이미지의 부모 id로 이 값을 사용함)parent_id- 예측을 생성한 이미지의 식별자(다음에서 가져와야 함WorkflowImageDataobject)image_dimensions- 예측의 기준이 된 이미지의 크기 - 형식:(height, width)inference_id- 추론 요청의 식별자(선택 사항이며, Roboflow 모델과 관련됨)예측 유형- 예측 유형root_parent_id- 하위 예측의 책임을 진 주요 Workflow 입력의 식별자(다음에서 가져와야 함WorkflowImageDataobject) - 보통 Workflow 입력 플레이스홀더의 식별자root_parent_coordinates- 원본 입력에 대한 오프셋 - 형식 (offset_x,offset_y)root_parent_dimensions- 원본 입력 이미지의 크기(height, width)parent_coordinates- 부모에 대한 오프셋 - 형식 (offset_x,offset_y)parent_dimensions- 부모 이미지의 크기(height, width)scaling_relative_to_parent- 부모 이미지에 대한 스케일링 계수scaling_relative_to_root_parent- 원본 입력 이미지에 대한 스케일링 계수데이터- 추출된 QR 코드
직렬화: API 뒤의 Execution Engine은 이러한 종류의 선택자가 Workflow 출력으로 선언되면 기본 데이터를 직렬화할 것입니다 - 직렬화는 다음과 같이 수행됩니다 sv.Detections.from_inference(...) 가 출력을 디코딩할 수 있도록 합니다. 엔티티 세부 정보: ObjectDetectionInferenceResponse
마지막 업데이트
도움이 되었나요?