Skip to content

Classification and Segmentation Tests

Sergey 'Jin' Bostandzhyan edited this page Oct 28, 2023 · 4 revisions

Testing an image that shows multiple deer with various models.

Whole Deer

As far as I can tell the best result was achieved with Grounded-SAM.

Original Image

IM_00054

grounded_sam

ground_dino

IM_00054_yolov8_scaled

IM_00054_segment_anything

IM_00054_dinov2

Deer Face Segmentation

Running Grounded SAM locally in an attempt to focus on deer faces:

python grounded_sam_demo.py   \
    --config GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py   \
    --grounded_checkpoint groundingdino_swint_ogc.pth   \
    --sam_checkpoint sam_vit_h_4b8939.pth   \
    --input_image ~/intro_thumbnail.jpg   \
    --output_dir "outputs"   \
    --box_threshold 0.3   \
    --text_threshold 0.25   \
    --text_prompt "deer face"   \
    --device "cuda"

Original image: intro_thumbnail

Grounded SAM output: grounded_sam_output

Mask: mask