The invention discloses a few-sample target detection method and
system based on an aggregation variational prototype. The method comprises the steps of constructing a
data set containing a
base class and a new class, dividing the
data set into a support set and a query set, generating a class prototype by utilizing a P-VAE module in combination with CLIP semantic features and a feature
discriminator, realizing bidirectional fusion of the support set and the query set features by means of an MFM module, fusing the query features and the class prototype, and inputting the fused query features and the class prototype into a detection head to complete target detection. The
system comprises a
data set construction module, a priori variational automatic
encoder P-VAE module, a mutual fusion module MFM, a
feature fusion module and a target detection module. According to the scheme, by introducing semantic priori, optimizing prototype generation and feature interaction, the problems of
data imbalance and insufficient new class feature representation in a few-sample scene are solved, improvement of new class detection precision is verified on PASCAL VOC, MS COCO and other data sets, and an
effective solution is provided for target detection of sample scarce scenes such as medical images and
rare species monitoring.