Spaces:
Running
Running
Upload 2 files
Browse files- SimSwap/arcface/__init__.py +1 -0
- SimSwap/arcface/model.py +13 -0
SimSwap/arcface/__init__.py
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
# arcface module init
|
SimSwap/arcface/model.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import torch.nn as nn
|
3 |
+
|
4 |
+
class Backbone(nn.Module):
|
5 |
+
def __init__(self, num_layers, drop_ratio, mode='ir_se'):
|
6 |
+
super(Backbone, self).__init__()
|
7 |
+
self.num_layers = num_layers
|
8 |
+
self.drop_ratio = drop_ratio
|
9 |
+
self.mode = mode
|
10 |
+
|
11 |
+
def forward(self, x):
|
12 |
+
# Retorna un tensor simulado con embedding normalizado
|
13 |
+
return x
|