Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ numpy>=1.18.5
opencv-python-headless==4.10.0.84
Pillow>=7.1.2
# https://github.com/roboflow/roboflow-python/issues/390
pi-heif<2
# pi-heif 1.x requires Python 3.10+
pi-heif<2; python_version >= "3.10"
pillow-avif-plugin<2
python-dateutil
python-dotenv
Expand Down
2 changes: 1 addition & 1 deletion roboflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from roboflow.models import CLIPModel, GazeModel # noqa: F401
from roboflow.util.general import write_line

__version__ = "1.2.12"
__version__ = "1.2.13"


def check_key(api_key, model, notebook, num_retries=0):
Expand Down
9 changes: 7 additions & 2 deletions roboflow/util/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
import urllib

# Third-party imports
import pi_heif # type: ignore[import-untyped]
import pillow_avif # type: ignore[import-untyped]
import requests
import yaml
from PIL import Image

pi_heif.register_heif_opener(thumbnails=False) # Register for HEIF/HEIC
# pi-heif requires Python 3.10+
try:
import pi_heif # type: ignore[import-untyped,import-not-found]

pi_heif.register_heif_opener(thumbnails=False) # Register for HEIF/HEIC
except ImportError:
pass
pillow_avif = pillow_avif # Reference pillow_avif to not remove import by accident


Expand Down
13 changes: 11 additions & 2 deletions roboflow/util/model_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,21 @@ def _process_yolo(model_type: str, model_path: str, filename: str) -> str:

def _process_rfdetr(model_type: str, model_path: str, filename: str) -> str:
_supported_types = [
# Detection models
"rfdetr-base",
"rfdetr-large",
"rfdetr-nano",
"rfdetr-small",
"rfdetr-medium",
"rfdetr-seg-preview",
"rfdetr-large",
"rfdetr-xlarge",
"rfdetr-2xlarge",
# Segmentation models
"rfdetr-seg-nano",
"rfdetr-seg-small",
"rfdetr-seg-medium",
"rfdetr-seg-large",
"rfdetr-seg-xlarge",
"rfdetr-seg-2xlarge",
]
if model_type not in _supported_types:
raise ValueError(f"Model type {model_type} not supported. Supported types are {_supported_types}")
Expand Down