Skip to content

Instantly share code, notes, and snippets.

@eddyxu
Last active January 29, 2022 21:08
Show Gist options
  • Save eddyxu/3c43cc6a6620cbe5916d52a71419da54 to your computer and use it in GitHub Desktop.
Save eddyxu/3c43cc6a6620cbe5916d52a71419da54 to your computer and use it in GitHub Desktop.
SELECT image_id, image, detection.* FROM (
SELECT image_id, image, explode(ML_PREDICT(ssd, image)) as detection FROM raw_data
) WHERE 100 < area(detection.box) AND area(detection.box) < 10000
AND coco_name(detection.label_id) IN ('chair', 'remote', 'cell phone')
AND detection.score < 0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment