Image Feature Extraction
Transformers
ONNX
Safetensors
English
Japanese
egara_net
feature-extraction
embeddings
illustration
vision-transformer
dino
custom-architecture
custom_code
Instructions to use Columba1198/EgaraNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Columba1198/EgaraNet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="Columba1198/EgaraNet", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Columba1198/EgaraNet", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +1 -2
- model.safetensors +1 -1
- modeling_egara_net.py +2 -2
README.md
CHANGED
|
@@ -23,7 +23,7 @@ model-index:
|
|
| 23 |
|
| 24 |
# EgaraNet — Illustration Style Embedding Model
|
| 25 |
|
| 26 |
-
EgaraNet is an embedding model that encodes the artistic style of illustrations into 1024-dimensional L2-normalized vectors. It was trained on approximately **1.2 million illustrations** from around **12,000 artists**, learning to produce embeddings where illustrations by the same artist are close together in the vector space.
|
| 27 |
|
| 28 |
## Model Description
|
| 29 |
|
|
@@ -34,7 +34,6 @@ EgaraNet is an embedding model that encodes the artistic style of illustrations
|
|
| 34 |
| **Input** | RGB images, any resolution (multiples of 16 recommended) |
|
| 35 |
| **Output** | L2-normalized style embedding vector |
|
| 36 |
| **Training Data** | ~1.2M illustrations from ~12K artists |
|
| 37 |
-
| **Legal Basis** | Article 30-4 of the Japanese Copyright Act |
|
| 38 |
|
| 39 |
### Architecture
|
| 40 |
|
|
|
|
| 23 |
|
| 24 |
# EgaraNet — Illustration Style Embedding Model
|
| 25 |
|
| 26 |
+
EgaraNet is an embedding model that encodes the artistic style of illustrations into 1024-dimensional L2-normalized vectors. It was trained on approximately **1.2 million illustrations** from around **12,000 artists**, learning to produce embeddings where illustrations by the same artist are close together in the vector space. Produced under Article 30-4 of the Japanese Copyright Act.
|
| 27 |
|
| 28 |
## Model Description
|
| 29 |
|
|
|
|
| 34 |
| **Input** | RGB images, any resolution (multiples of 16 recommended) |
|
| 35 |
| **Output** | L2-normalized style embedding vector |
|
| 36 |
| **Training Data** | ~1.2M illustrations from ~12K artists |
|
|
|
|
| 37 |
|
| 38 |
### Architecture
|
| 39 |
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1389584856
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc07899ef37fc10821834d26888d52e1d6e5cc335f2e9aaf4a71c94e5f3c8ddb
|
| 3 |
size 1389584856
|
modeling_egara_net.py
CHANGED
|
@@ -165,7 +165,7 @@ class StyleNet(nn.Module):
|
|
| 165 |
else nn.Linear(input_dim, hidden_dim)
|
| 166 |
)
|
| 167 |
|
| 168 |
-
self.
|
| 169 |
TransposedTransformerBlock(
|
| 170 |
dim=hidden_dim,
|
| 171 |
num_heads=config.ttb_num_heads,
|
|
@@ -187,7 +187,7 @@ class StyleNet(nn.Module):
|
|
| 187 |
|
| 188 |
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 189 |
x = self.input_proj(x)
|
| 190 |
-
for layer in self.
|
| 191 |
x = layer(x)
|
| 192 |
x = self.attn_pool(x)
|
| 193 |
x = self.head(x)
|
|
|
|
| 165 |
else nn.Linear(input_dim, hidden_dim)
|
| 166 |
)
|
| 167 |
|
| 168 |
+
self.ttb_layers = nn.ModuleList([
|
| 169 |
TransposedTransformerBlock(
|
| 170 |
dim=hidden_dim,
|
| 171 |
num_heads=config.ttb_num_heads,
|
|
|
|
| 187 |
|
| 188 |
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 189 |
x = self.input_proj(x)
|
| 190 |
+
for layer in self.ttb_layers:
|
| 191 |
x = layer(x)
|
| 192 |
x = self.attn_pool(x)
|
| 193 |
x = self.head(x)
|