Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Code, Git & Developer Tools

Code, Git & Developer Tools

Set Up Qdrant Medoids for Anomaly Detection

When you run it, Qdrant cluster distances are computed and medoid vectors are selected for use in crop image anomaly detection.

What it does

Here we're extracting and gathering all the information about crop clusters, so we can call Qdrant distance matrix API for each cluster. We're propagating the biggest cluster size (of labeled data, in our case all data is labeled; for real use cases don't call distance matrix API if your labeled data is more than a couple of hundreds), the number of unique crop values and unique crop values themselves. We will run the algorithm once per unique crop cluster (to find it's center and threshold).

The steps

  1. When clicking ‘Test workflow’
  2. Total Points in Collection
  3. Cluster Distance Matrix
  4. Scipy Sparse Matrix
  5. Set medoid id
  6. Get Medoid Vector
  7. Prepare for Searching Threshold
  8. Searching Score
  9. Threshold Score
  10. Set medoid threshold score
  11. Split Out1
  12. Merge
  13. Textual (visual) crop descriptions
  14. Embed text

26 steps in total.

Similar automations