# Single sample detection

# Definition of method

Single Sample Detection (One-shot Detection, OSD) can detect objects of that category in the input image using only one image of the category to be detected. The category image to be detected is called theOSD marker。 Unlike general object detection, OSD It is theoretically possible to detect any user-specified category. This method allows OSD marker There is a difference in perspective or a certain degree of shape difference from the object in the input image.

# Application Scenario Examples

  1. Landmark Building Inspection.
  2. Logo detection.
  3. Product inspection.
  4. Pet testing.
  5. Animation image detection.

osd移动端演示

# Capacity Introduction

  • Methods of Use
  1. Add to OSD marker : Call VKSession.addOSDMarker() Sets the object to be detected, such as a product picture, returns themarkerId. Dxplaination:
    (1) This function can be called multiple times to add multiple pictures for detecting multiple kinds of objects.
    (2) Add to OSD marker Then you can continue to input images to detect objects, and you do not need to add a new image before each input. OSD marker
  2. delete OSD marker : Call VKSession.removeOSDMarker() according to markerId Delete correspondence OSD marker The object is no longer detected.
  3. Get all the current OSD marker Information: Call VKSession.getAllOSDMarker() Get all the current OSD marker Each item in the list contains markerId And the path to that picture.
  • Program Examples
    Can be found at [Single sample detection(OSD)Ability to use reference](https://github.com/WeChat mini-program /miniprogram-demo/tree/master/miniprogram/packageAPI/pages/ar/osd-ar) Page to view the sample code.