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
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ download_and_cache <- function(url, redownload = FALSE, prefix = NULL) {

if (!file.exists(path) || redownload) {
# we should first download to a temporary file because
# download probalems could cause hard to debug errors.
# download problems could cause hard to debug errors.
tmp <- tempfile(fileext = fs::path_ext(path))
on.exit({try({fs::file_delete(tmp)}, silent = TRUE)}, add = TRUE)

Expand Down
6 changes: 4 additions & 2 deletions tools/convert-models.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def blob_exist(bucket_name, blob_name):
'yolo_v12_n': 'https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo12n.pt',
'yolo_v12_s': 'https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo12s.pt',
'yolo_v12_x': 'https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo12x.pt',
'tabicl_classifier_v2': 'https://huggingface.co/jingang/TabICL/resolve/main/tabicl-classifier-v2-20260212.ckpt',
'tabicl_regressor_v2': 'https://huggingface.co/jingang/TabICL/resolve/main/tabicl-regressor-v2-20260212.ckpt',
}

os.makedirs("models", exist_ok=True)
Expand All @@ -172,8 +174,8 @@ def blob_exist(bucket_name, blob_name):
if name.startswith("convnext_") and name.endswith("k"):
m = m["model"]

# openmmlab models weights are embedded in a named object
if name.startswith("convnext_") and "_upernet_" in name:
# openmmlab and jingang models weights are embedded in a named object
if (name.startswith("convnext_") and "_upernet_" in name) or name.startswith("tabicl_"):
m = m["state_dict"]

for nm, par in m.items():
Expand Down
Loading