Spaces:
Running
on
Zero
Running
on
Zero
test
Browse files
requirements.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
torch
|
2 |
torchvision
|
3 |
torchaudio
|
4 |
-
numpy
|
5 |
face_alignment
|
6 |
imageio
|
7 |
imageio-ffmpeg
|
|
|
1 |
torch
|
2 |
torchvision
|
3 |
torchaudio
|
4 |
+
numpy==1.23.5
|
5 |
face_alignment
|
6 |
imageio
|
7 |
imageio-ffmpeg
|
src/face3d/models/arcface_torch/torch2onnx.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
def convert_onnx(net, path_module, output, opset=11, simplify=False):
|
7 |
assert isinstance(net, torch.nn.Module)
|
8 |
img = np.random.randint(0, 255, size=(112, 112, 3), dtype=np.int32)
|
9 |
-
img = img.astype(np.
|
10 |
img = (img / 255. - 0.5) / 0.5 # torch style norm
|
11 |
img = img.transpose((2, 0, 1))
|
12 |
img = torch.from_numpy(img).unsqueeze(0).float()
|
|
|
6 |
def convert_onnx(net, path_module, output, opset=11, simplify=False):
|
7 |
assert isinstance(net, torch.nn.Module)
|
8 |
img = np.random.randint(0, 255, size=(112, 112, 3), dtype=np.int32)
|
9 |
+
img = img.astype(np.float)
|
10 |
img = (img / 255. - 0.5) / 0.5 # torch style norm
|
11 |
img = img.transpose((2, 0, 1))
|
12 |
img = torch.from_numpy(img).unsqueeze(0).float()
|