Image Feature Extraction
Transformers
Safetensors
skinmap
feature-extraction
dermatology
medical-imaging
embeddings
clip
custom_code
Instructions to use Digital-Dermatology/SkinMap with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Digital-Dermatology/SkinMap with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="Digital-Dermatology/SkinMap", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Digital-Dermatology/SkinMap", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| """HuggingFace config for the packaged SkinMap multi-teacher embedding model.""" | |
| from transformers import PretrainedConfig | |
| class SkinMapConfig(PretrainedConfig): | |
| """Minimal config for SkinMap. | |
| SkinMap is not a single set of HF weights but an ensemble of teacher encoders | |
| plus a trained projector, whose loading is driven by a bundled pipeline-config | |
| JSON. This config only points at that JSON and records the output | |
| dimensionality. The heavy lifting happens in `SkinMapModel`. | |
| """ | |
| model_type = "skinmap" | |
| def __init__( | |
| self, | |
| embedding_dim: int = 1024, | |
| pipeline_config: str = "weights/embedding_pipeline_config.json", | |
| probes_dir: str = "probes", | |
| **kwargs, | |
| ): | |
| self.embedding_dim = embedding_dim | |
| # Paths are relative to the repo snapshot root. | |
| self.pipeline_config = pipeline_config | |
| # Directory of bundled metadata probes (enables predict_meta); may be | |
| # absent in an embedding-only package. | |
| self.probes_dir = probes_dir | |
| super().__init__(**kwargs) | |