Instructions to use HanClinto/milo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- CollectorVision
How to use HanClinto/milo with CollectorVision:
pip install git+https://github.com/HanClinto/CollectorVision huggingface_hub
from huggingface_hub import hf_hub_download import collector_vision as cvg checkpoint = hf_hub_download(repo_id="HanClinto/milo", filename="model.onnx") # Detector models, such as Cornelius: detector = cvg.NeuralCornerDetector(checkpoint) # Embedder models, such as Milo: embedder = cvg.NeuralEmbedder(checkpoint)
- Notebooks
- Google Colab
- Kaggle
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- onnx
|
| 5 |
+
- image-retrieval
|
| 6 |
+
- metric-learning
|
| 7 |
+
- arcface
|
| 8 |
+
- mobilevit
|
| 9 |
+
base_model: apple/mobilevit-xx-small
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Milo — CCG Card Embedder
|
| 13 |
+
|
| 14 |
+
MobileViT-XXS backbone trained with ArcFace loss (multitask: illustration_id + set_code) to produce 128-dimensional L2-normalised embeddings of CCG card images for nearest-neighbour retrieval.
|
| 15 |
+
|
| 16 |
+
## Model details
|
| 17 |
+
|
| 18 |
+
| Property | Value |
|
| 19 |
+
|---|---|
|
| 20 |
+
| Architecture | MobileViT-XXS + linear projection |
|
| 21 |
+
| Input | 448×448 RGB, ImageNet-normalised |
|
| 22 |
+
| Output | 128-d L2-normalised embedding vector |
|
| 23 |
+
| Parameters | ~1.0M |
|
| 24 |
+
| File size | 5.2 MB (fp32 ONNX) |
|
| 25 |
+
| Codename | milo |
|
| 26 |
+
| Version | 1.0.0 (epoch 15) |
|
| 27 |
+
| Training labels | illustration_id + set_code (multitask ArcFace) |
|
| 28 |
+
|
| 29 |
+
## Usage
|
| 30 |
+
|
| 31 |
+
Version: ImageMagick 7.1.2-13 Q16-HDRI aarch64 23522 https://imagemagick.org
|
| 32 |
+
Copyright: (C) 1999 ImageMagick Studio LLC
|
| 33 |
+
License: https://imagemagick.org/license/
|
| 34 |
+
Features: Cipher DPC HDRI Modules
|
| 35 |
+
Delegates (built-in): bzlib heic jng jpeg lcms ltdl lzma png tiff webp xml zlib zstd
|
| 36 |
+
Compiler: clang (17.0.0)
|
| 37 |
+
Usage: import [options ...] [ file ]
|
| 38 |
+
|
| 39 |
+
Image Settings:
|
| 40 |
+
-adjoin join images into a single multi-image file
|
| 41 |
+
-border include window border in the output image
|
| 42 |
+
-channel type apply option to select image channels
|
| 43 |
+
-colorspace type alternate image colorspace
|
| 44 |
+
-comment string annotate image with comment
|
| 45 |
+
-compress type type of pixel compression when writing the image
|
| 46 |
+
-define format:option
|
| 47 |
+
define one or more image format options
|
| 48 |
+
-density geometry horizontal and vertical density of the image
|
| 49 |
+
-depth value image depth
|
| 50 |
+
-descend obtain image by descending window hierarchy
|
| 51 |
+
-display server X server to contact
|
| 52 |
+
-dispose method layer disposal method
|
| 53 |
+
-dither method apply error diffusion to image
|
| 54 |
+
-delay value display the next image after pausing
|
| 55 |
+
-encipher filename convert plain pixels to cipher pixels
|
| 56 |
+
-endian type endianness (MSB or LSB) of the image
|
| 57 |
+
-encoding type text encoding type
|
| 58 |
+
-filter type use this filter when resizing an image
|
| 59 |
+
-format "string" output formatted image characteristics
|
| 60 |
+
-frame include window manager frame
|
| 61 |
+
-gravity direction which direction to gravitate towards
|
| 62 |
+
-identify identify the format and characteristics of the image
|
| 63 |
+
-interlace type None, Line, Plane, or Partition
|
| 64 |
+
-interpolate method pixel color interpolation method
|
| 65 |
+
-label string assign a label to an image
|
| 66 |
+
-limit type value Area, Disk, Map, or Memory resource limit
|
| 67 |
+
-monitor monitor progress
|
| 68 |
+
-page geometry size and location of an image canvas
|
| 69 |
+
-pause seconds seconds delay between snapshots
|
| 70 |
+
-pointsize value font point size
|
| 71 |
+
-quality value JPEG/MIFF/PNG compression level
|
| 72 |
+
-quiet suppress all warning messages
|
| 73 |
+
-regard-warnings pay attention to warning messages
|
| 74 |
+
-repage geometry size and location of an image canvas
|
| 75 |
+
-respect-parentheses settings remain in effect until parenthesis boundary
|
| 76 |
+
-sampling-factor geometry
|
| 77 |
+
horizontal and vertical sampling factor
|
| 78 |
+
-scene value image scene number
|
| 79 |
+
-screen select image from root window
|
| 80 |
+
-seed value seed a new sequence of pseudo-random numbers
|
| 81 |
+
-set property value set an image property
|
| 82 |
+
-silent operate silently, i.e. don't ring any bells
|
| 83 |
+
-snaps value number of screen snapshots
|
| 84 |
+
-support factor resize support: > 1.0 is blurry, < 1.0 is sharp
|
| 85 |
+
-synchronize synchronize image to storage device
|
| 86 |
+
-taint declare the image as modified
|
| 87 |
+
-transparent-color color
|
| 88 |
+
transparent color
|
| 89 |
+
-treedepth value color tree depth
|
| 90 |
+
-verbose print detailed information about the image
|
| 91 |
+
-virtual-pixel method
|
| 92 |
+
Constant, Edge, Mirror, or Tile
|
| 93 |
+
-window id select window with this id or name
|
| 94 |
+
root selects whole screen
|
| 95 |
+
|
| 96 |
+
Image Operators:
|
| 97 |
+
-annotate geometry text
|
| 98 |
+
annotate the image with text
|
| 99 |
+
-colors value preferred number of colors in the image
|
| 100 |
+
-crop geometry preferred size and location of the cropped image
|
| 101 |
+
-encipher filename convert plain pixels to cipher pixels
|
| 102 |
+
-extent geometry set the image size
|
| 103 |
+
-geometry geometry preferred size or location of the image
|
| 104 |
+
-help print program options
|
| 105 |
+
-monochrome transform image to black and white
|
| 106 |
+
-negate replace every pixel with its complementary color
|
| 107 |
+
-quantize colorspace reduce colors in this colorspace
|
| 108 |
+
-resize geometry resize the image
|
| 109 |
+
-rotate degrees apply Paeth rotation to the image
|
| 110 |
+
-strip strip image of all profiles and comments
|
| 111 |
+
-thumbnail geometry create a thumbnail of the image
|
| 112 |
+
-transparent color make this color transparent within the image
|
| 113 |
+
-trim trim image edges
|
| 114 |
+
-type type image type
|
| 115 |
+
|
| 116 |
+
Miscellaneous Options:
|
| 117 |
+
-debug events display copious debugging information
|
| 118 |
+
-help print program options
|
| 119 |
+
-list type print a list of supported option arguments
|
| 120 |
+
-log format format of debugging information
|
| 121 |
+
-version print version information
|
| 122 |
+
|
| 123 |
+
By default, 'file' is written in the MIFF image format. To
|
| 124 |
+
specify a particular image format, precede the filename with an image
|
| 125 |
+
format name and a colon (i.e. ps:image) or specify the image type as
|
| 126 |
+
the filename suffix (i.e. image.ps). Specify 'file' as '-' for
|
| 127 |
+
standard input or output.
|
| 128 |
+
Version: ImageMagick 7.1.2-13 Q16-HDRI aarch64 23522 https://imagemagick.org
|
| 129 |
+
Copyright: (C) 1999 ImageMagick Studio LLC
|
| 130 |
+
License: https://imagemagick.org/license/
|
| 131 |
+
Features: Cipher DPC HDRI Modules
|
| 132 |
+
Delegates (built-in): bzlib heic jng jpeg lcms ltdl lzma png tiff webp xml zlib zstd
|
| 133 |
+
Compiler: clang (17.0.0)
|
| 134 |
+
Usage: import [options ...] [ file ]
|
| 135 |
+
|
| 136 |
+
Image Settings:
|
| 137 |
+
-adjoin join images into a single multi-image file
|
| 138 |
+
-border include window border in the output image
|
| 139 |
+
-channel type apply option to select image channels
|
| 140 |
+
-colorspace type alternate image colorspace
|
| 141 |
+
-comment string annotate image with comment
|
| 142 |
+
-compress type type of pixel compression when writing the image
|
| 143 |
+
-define format:option
|
| 144 |
+
define one or more image format options
|
| 145 |
+
-density geometry horizontal and vertical density of the image
|
| 146 |
+
-depth value image depth
|
| 147 |
+
-descend obtain image by descending window hierarchy
|
| 148 |
+
-display server X server to contact
|
| 149 |
+
-dispose method layer disposal method
|
| 150 |
+
-dither method apply error diffusion to image
|
| 151 |
+
-delay value display the next image after pausing
|
| 152 |
+
-encipher filename convert plain pixels to cipher pixels
|
| 153 |
+
-endian type endianness (MSB or LSB) of the image
|
| 154 |
+
-encoding type text encoding type
|
| 155 |
+
-filter type use this filter when resizing an image
|
| 156 |
+
-format "string" output formatted image characteristics
|
| 157 |
+
-frame include window manager frame
|
| 158 |
+
-gravity direction which direction to gravitate towards
|
| 159 |
+
-identify identify the format and characteristics of the image
|
| 160 |
+
-interlace type None, Line, Plane, or Partition
|
| 161 |
+
-interpolate method pixel color interpolation method
|
| 162 |
+
-label string assign a label to an image
|
| 163 |
+
-limit type value Area, Disk, Map, or Memory resource limit
|
| 164 |
+
-monitor monitor progress
|
| 165 |
+
-page geometry size and location of an image canvas
|
| 166 |
+
-pause seconds seconds delay between snapshots
|
| 167 |
+
-pointsize value font point size
|
| 168 |
+
-quality value JPEG/MIFF/PNG compression level
|
| 169 |
+
-quiet suppress all warning messages
|
| 170 |
+
-regard-warnings pay attention to warning messages
|
| 171 |
+
-repage geometry size and location of an image canvas
|
| 172 |
+
-respect-parentheses settings remain in effect until parenthesis boundary
|
| 173 |
+
-sampling-factor geometry
|
| 174 |
+
horizontal and vertical sampling factor
|
| 175 |
+
-scene value image scene number
|
| 176 |
+
-screen select image from root window
|
| 177 |
+
-seed value seed a new sequence of pseudo-random numbers
|
| 178 |
+
-set property value set an image property
|
| 179 |
+
-silent operate silently, i.e. don't ring any bells
|
| 180 |
+
-snaps value number of screen snapshots
|
| 181 |
+
-support factor resize support: > 1.0 is blurry, < 1.0 is sharp
|
| 182 |
+
-synchronize synchronize image to storage device
|
| 183 |
+
-taint declare the image as modified
|
| 184 |
+
-transparent-color color
|
| 185 |
+
transparent color
|
| 186 |
+
-treedepth value color tree depth
|
| 187 |
+
-verbose print detailed information about the image
|
| 188 |
+
-virtual-pixel method
|
| 189 |
+
Constant, Edge, Mirror, or Tile
|
| 190 |
+
-window id select window with this id or name
|
| 191 |
+
root selects whole screen
|
| 192 |
+
|
| 193 |
+
Image Operators:
|
| 194 |
+
-annotate geometry text
|
| 195 |
+
annotate the image with text
|
| 196 |
+
-colors value preferred number of colors in the image
|
| 197 |
+
-crop geometry preferred size and location of the cropped image
|
| 198 |
+
-encipher filename convert plain pixels to cipher pixels
|
| 199 |
+
-extent geometry set the image size
|
| 200 |
+
-geometry geometry preferred size or location of the image
|
| 201 |
+
-help print program options
|
| 202 |
+
-monochrome transform image to black and white
|
| 203 |
+
-negate replace every pixel with its complementary color
|
| 204 |
+
-quantize colorspace reduce colors in this colorspace
|
| 205 |
+
-resize geometry resize the image
|
| 206 |
+
-rotate degrees apply Paeth rotation to the image
|
| 207 |
+
-strip strip image of all profiles and comments
|
| 208 |
+
-thumbnail geometry create a thumbnail of the image
|
| 209 |
+
-transparent color make this color transparent within the image
|
| 210 |
+
-trim trim image edges
|
| 211 |
+
-type type image type
|
| 212 |
+
|
| 213 |
+
Miscellaneous Options:
|
| 214 |
+
-debug events display copious debugging information
|
| 215 |
+
-help print program options
|
| 216 |
+
-list type print a list of supported option arguments
|
| 217 |
+
-log format format of debugging information
|
| 218 |
+
-version print version information
|
| 219 |
+
|
| 220 |
+
By default, 'file' is written in the MIFF image format. To
|
| 221 |
+
specify a particular image format, precede the filename with an image
|
| 222 |
+
format name and a colon (i.e. ps:image) or specify the image type as
|
| 223 |
+
the filename suffix (i.e. image.ps). Specify 'file' as '-' for
|
| 224 |
+
standard input or output.
|
| 225 |
+
|
| 226 |
+
Cosine similarity between two embeddings is just their dot product (both are unit vectors).
|
| 227 |
+
|
| 228 |
+
## Gallery compatibility
|
| 229 |
+
|
| 230 |
+
Gallery files built with Milo v1.0.0 use the token in their filename. Embeddings from different Milo versions are **not** compatible — rebuild the gallery when upgrading.
|
| 231 |
+
|
| 232 |
+
## Part of CollectorVision
|
| 233 |
+
|
| 234 |
+
Used together with [HanClinto/cornelius](https://huggingface.co/HanClinto/cornelius) in the [collector_vision](https://github.com/HanClinto/collector_vision) inference library.
|