# 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
- Landmark Building Inspection.
- Logo detection.
- Product inspection.
- Pet testing.
- Animation image detection.
# Capacity Introduction
- Methods of Use
- 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 toOSD 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
。 - delete
OSD marker
: Call VKSession.removeOSDMarker() according tomarkerId
Delete correspondenceOSD marker
The object is no longer detected. - Get all the current
OSD marker
Information: Call VKSession.getAllOSDMarker() Get all the currentOSD marker
Each item in the list containsmarkerId
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.