pypi ultralytics 8.2.84
v8.2.84 - `ultralytics 8.2.84` new SAM flexible `imgsz` inference (#15882)

latest releases: 8.3.28, 8.3.27, 8.3.26...
2 months ago

🌟 Summary

This update introduces flexible image size inference for SAM2 using the ultralytics package, alongside improvements to testing and documentation.

📊 Key Changes

  • Flexible SAM2 Image Size Inference: SAM2 now supports custom image sizes through the ultralytics package, allowing inference at sizes like 640x640 instead of the default 1024x1024.
  • Testing Enhancement: Updated CI testing workflow for version-specific compatibility.
  • Documentation Update: Refreshed documentation with higher quality images.

🎯 Purpose & Impact

  • Enhanced Flexibility: Users can now run SAM2 inference using the ultralytics package with custom imgsz values (e.g., imgsz=640), offering significant advantages:
    • Faster processing times for smaller images
    • Reduced memory usage, enabling inference on devices with limited resources
    • Maintains good segmentation quality while allowing size-performance tradeoffs
  • Improved Efficiency: The ability to use smaller image sizes (like 640x640) instead of the default 1024x1024 can lead to faster inference without significant loss in accuracy for many use cases.
  • Broader Accessibility: This update makes SAM2 more accessible for users with varying computational resources, as they can now adjust the image size based on their specific needs and hardware constraints.

💻 Usage Example

from ultralytics import SAM

# Initialize SAM model
model = SAM('sam2_b.pt')

# Run inference with custom image size
results = model('path/to/image.jpg', imgsz=640)

This update significantly enhances SAM2's versatility within the ultralytics ecosystem, allowing users to fine-tune the balance between speed and accuracy based on their specific requirements.

What's Changed

Full Changelog: v8.2.83...v8.2.84

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.