Single Sample Detection

View Markdown

Last edited on 2026-07-23

Method Definition

One-shot Detection (OSD) uses only one image of the target category to detect objects of that category in the input image. The image of the target category is referred to as the OSD marker. Unlike general object detection, OSD can theoretically detect any user-specified category. This method allows the OSD marker to have viewpoint differences or a certain degree of shape differences compared to the objects in the input image.

Use Case Examples

  1. Landmark Detection.
  2. Logo Detection.
  3. Product Detection.
  4. Pet Detection.
  5. Anime Character Detection.
osd mobile demo

Overview

  • Usage
  1. Add OSD marker : Call VKSession.addOSDMarker() to set the object to be detected, such as a product image, and return markerId. Note:
    (1) This function can be called multiple times to add multiple images for detecting various types of objects.
    (2) After adding an OSD marker, you can continuously input images to detect objects without needing to add an OSD marker before each image input.
  2. Remove OSD marker : Call VKSession.removeOSDMarker() to remove the corresponding OSD marker based on markerId, thereby stopping detection of that object.
  3. Get information for all current OSD markers : Call VKSession.getAllOSDMarker() to retrieve a list of all current OSD markers. Each item in the list contains the markerId and the path of the image.