Views
No views yet
| Model | Architecture | Checkpoint | Val AUC |
|---|---|---|---|
| autotune_btsbot_optuna_asha | DeiT3 | DeiT3-epoch=14-val_auc=0.9999.ckpt | 0.9999 |
| autotune_btsbot_optuna_fifo | DeiT3 | DeiT3-epoch=15-val_auc=0.9995.ckpt | 0.9995 |
| autotune_btsbot_optuna_hyperband | DeiT3 | DeiT3-epoch=17-val_auc=0.9999.ckpt | 0.9999 |
| autotune_btsbot_optuna_median | DeiT3 | DeiT3-epoch=19-val_auc=0.9996.ckpt | 0.9996 |
| autotune_btsbot_optuna_pb2 | DeiT | DeiT-epoch=19-val_auc=0.9692.ckpt | 0.9692 |
| autotune_btsbot_optuna_pbt | CaiT | CaiT-epoch=19-val_auc=0.9954.ckpt | 0.9954 |
| autotune_btsbot_random_asha | DeiT | DeiT-epoch=14-val_auc=0.9995.ckpt | 0.9995 |
| autotune_btsbot_random_fifo | DeiT3 | DeiT3-epoch=13-val_auc=0.9998.ckpt | 0.9998 |
| autotune_btsbot_random_hyperband | CaiT | CaiT-epoch=14-val_auc=0.9997.ckpt | 0.9997 |
| autotune_btsbot_random_median | DeiT | DeiT-epoch=14-val_auc=0.9963.ckpt | 0.9963 |
1from huggingface_hub import hf_hub_download
2from safetensors.torch import load_file
3import timm
4
5# Download model weights
6model_path = hf_hub_download(
7 repo_id="parlange/autotune-models",
8 filename="autotune_btsbot_optuna_asha/model.safetensors"
9)
10
11# Load weights
12state_dict = load_file(model_path)
13
14# Create model architecture (DeiT3 example)
15model = timm.create_model("deit3_base_patch16_224", pretrained=False, num_classes=2)
16model.load_state_dict(state_dict, strict=False)
17model.eval()1!pip install huggingface_hub safetensors timm torch torchvision
2
3from huggingface_hub import hf_hub_download
4from safetensors.torch import load_file
5import timm
6import torch
7from torchvision import transforms
8from PIL import Image
9
10# Download model
11model_path = hf_hub_download(
12 repo_id="parlange/autotune-models",
13 filename="autotune_btsbot_optuna_asha/model.safetensors"
14)
15
16# Load model
17state_dict = load_file(model_path)
18model = timm.create_model("deit3_base_patch16_224", pretrained=False, num_classes=2)
19model.load_state_dict(state_dict, strict=False)
20model.eval()
21
22# Inference
23transform = transforms.Compose([
24 transforms.Resize((224, 224)),
25 transforms.ToTensor(),
26 transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
27])
28
29# Load your triplet image (3-channel: science, reference, difference)
30# image = Image.open("triplet.png").convert("RGB")
31# input_tensor = transform(image).unsqueeze(0)
32# with torch.no_grad():
33# output = model(input_tensor)
34# prediction = torch.softmax(output, dim=1)
35# print(f"Real probability: {prediction[0, 1]:.4f}")1import torch
2
3checkpoint = torch.load("checkpoint.ckpt", map_location="cpu")
4state_dict = checkpoint["state_dict"]
5
6# Remove 'model.' prefix if present
7state_dict = {k.replace("model.", ""): v for k, v in state_dict.items()}