Feature Extraction
Transformers
Safetensors
jolia
medical
radiology
ct
3d
vision
foundation-model
self-supervised
custom_code
Instructions to use raidium/Jolia with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use raidium/Jolia with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="raidium/Jolia", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("raidium/Jolia", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files
__pycache__/jolia_atlas_transform.cpython-312.pyc
ADDED
|
Binary file (29.8 kB). View file
|
|
|
__pycache__/jolia_windowing.cpython-312.pyc
ADDED
|
Binary file (24.4 kB). View file
|
|
|
__pycache__/preprocessing_jolia.cpython-312.pyc
ADDED
|
Binary file (4.52 kB). View file
|
|
|
jolia_atlas_transform.py
CHANGED
|
@@ -10,7 +10,10 @@ from typing import TYPE_CHECKING, Sequence, Union
|
|
| 10 |
|
| 11 |
import torch
|
| 12 |
import torch.nn.functional as F
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
if TYPE_CHECKING:
|
| 16 |
import numpy as np
|
|
|
|
| 10 |
|
| 11 |
import torch
|
| 12 |
import torch.nn.functional as F
|
| 13 |
+
try:
|
| 14 |
+
from .jolia_windowing import batch_apply_windowing_vectorized
|
| 15 |
+
except ImportError:
|
| 16 |
+
from jolia_windowing import batch_apply_windowing_vectorized
|
| 17 |
|
| 18 |
if TYPE_CHECKING:
|
| 19 |
import numpy as np
|
preprocessing_jolia.py
CHANGED
|
@@ -21,14 +21,26 @@ from typing import Union
|
|
| 21 |
|
| 22 |
import torch
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
try: # numpy is optional at import time; only needed for ndarray inputs
|
| 34 |
import numpy as np
|
|
|
|
| 21 |
|
| 22 |
import torch
|
| 23 |
|
| 24 |
+
# Works both inside a package (HF trust_remote_code) and as a top-level module
|
| 25 |
+
# (the `snapshot_download` + `sys.path.append` flow in the README).
|
| 26 |
+
try:
|
| 27 |
+
from .jolia_atlas_transform import (
|
| 28 |
+
ApplyWindowing,
|
| 29 |
+
AtlasTransform,
|
| 30 |
+
Crop3D,
|
| 31 |
+
Pad3D,
|
| 32 |
+
PrepareVolume,
|
| 33 |
+
Resample3D,
|
| 34 |
+
)
|
| 35 |
+
except ImportError:
|
| 36 |
+
from jolia_atlas_transform import (
|
| 37 |
+
ApplyWindowing,
|
| 38 |
+
AtlasTransform,
|
| 39 |
+
Crop3D,
|
| 40 |
+
Pad3D,
|
| 41 |
+
PrepareVolume,
|
| 42 |
+
Resample3D,
|
| 43 |
+
)
|
| 44 |
|
| 45 |
try: # numpy is optional at import time; only needed for ndarray inputs
|
| 46 |
import numpy as np
|