Skip to content

Commit cf5cc13

Browse files
committed
new folder for inference files
1 parent 794d0b9 commit cf5cc13

6 files changed

+24
-48
lines changed

SberSwapInference.ipynb

+24-48
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": 1,
6-
"id": "lightweight-atlas",
6+
"id": "cellular-michael",
77
"metadata": {},
88
"outputs": [
99
{
@@ -20,9 +20,9 @@
2020
"import torch\n",
2121
"import time\n",
2222
"\n",
23-
"from utils.image_processing import crop_face\n",
24-
"from utils.video_processing import read_video, get_final_video_frame, add_audio_from_another_video\n",
25-
"from utils.core import model_inference\n",
23+
"from utils.inference.image_processing import crop_face\n",
24+
"from utils.inference.video_processing import read_video, get_final_video_frame, add_audio_from_another_video\n",
25+
"from utils.inference.core import model_inference\n",
2626
"\n",
2727
"from network.AEI_Net import AEI_Net\n",
2828
"from coordinate_reg.image_infer import Handler\n",
@@ -32,7 +32,7 @@
3232
},
3333
{
3434
"cell_type": "markdown",
35-
"id": "typical-herald",
35+
"id": "equipped-exploration",
3636
"metadata": {},
3737
"source": [
3838
"### Load Models"
@@ -41,33 +41,9 @@
4141
{
4242
"cell_type": "code",
4343
"execution_count": null,
44-
"id": "documentary-hudson",
44+
"id": "overall-request",
4545
"metadata": {},
46-
"outputs": [
47-
{
48-
"name": "stderr",
49-
"output_type": "stream",
50-
"text": [
51-
"/home/jovyan/.local/lib/python3.8/site-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.\n",
52-
" and should_run_async(code)\n"
53-
]
54-
},
55-
{
56-
"name": "stdout",
57-
"output_type": "stream",
58-
"text": [
59-
"input mean and std: 127.5 127.5\n",
60-
"find model: ./insightface_func/models/antelope/glintr100.onnx recognition\n",
61-
"find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection\n",
62-
"set det-size: (640, 640)\n",
63-
"loading ./coordinate_reg/model/2d106det 0\n",
64-
"input mean and std: 127.5 127.5\n",
65-
"find model: ./insightface_func/models/antelope/glintr100.onnx recognition\n",
66-
"find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection\n",
67-
"set det-size: (640, 640)\n"
68-
]
69-
}
70-
],
46+
"outputs": [],
7147
"source": [
7248
"app = Face_detect_crop(name='antelope', root='./insightface_func/models')\n",
7349
"app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640))\n",
@@ -91,7 +67,7 @@
9167
},
9268
{
9369
"cell_type": "markdown",
94-
"id": "functioning-impact",
70+
"id": "outdoor-consensus",
9571
"metadata": {},
9672
"source": [
9773
"### Set here path to source image and video for faceswap"
@@ -100,7 +76,7 @@
10076
{
10177
"cell_type": "code",
10278
"execution_count": null,
103-
"id": "other-martial",
79+
"id": "major-employment",
10480
"metadata": {},
10581
"outputs": [],
10682
"source": [
@@ -118,7 +94,7 @@
11894
{
11995
"cell_type": "code",
12096
"execution_count": null,
121-
"id": "multiple-redhead",
97+
"id": "adult-forth",
12298
"metadata": {},
12399
"outputs": [],
124100
"source": [
@@ -135,7 +111,7 @@
135111
{
136112
"cell_type": "code",
137113
"execution_count": null,
138-
"id": "mathematical-chapter",
114+
"id": "under-maryland",
139115
"metadata": {},
140116
"outputs": [],
141117
"source": [
@@ -146,7 +122,7 @@
146122
},
147123
{
148124
"cell_type": "markdown",
149-
"id": "independent-immune",
125+
"id": "productive-prisoner",
150126
"metadata": {},
151127
"source": [
152128
"### Model Inference"
@@ -155,7 +131,7 @@
155131
{
156132
"cell_type": "code",
157133
"execution_count": null,
158-
"id": "affiliated-reading",
134+
"id": "fourth-procurement",
159135
"metadata": {},
160136
"outputs": [],
161137
"source": [
@@ -165,7 +141,7 @@
165141
{
166142
"cell_type": "code",
167143
"execution_count": null,
168-
"id": "outstanding-multiple",
144+
"id": "acceptable-liberal",
169145
"metadata": {},
170146
"outputs": [],
171147
"source": [
@@ -180,7 +156,7 @@
180156
{
181157
"cell_type": "code",
182158
"execution_count": null,
183-
"id": "rising-requirement",
159+
"id": "olympic-shaft",
184160
"metadata": {},
185161
"outputs": [],
186162
"source": [
@@ -196,7 +172,7 @@
196172
{
197173
"cell_type": "code",
198174
"execution_count": null,
199-
"id": "wired-plane",
175+
"id": "double-oxide",
200176
"metadata": {},
201177
"outputs": [],
202178
"source": [
@@ -206,7 +182,7 @@
206182
{
207183
"cell_type": "code",
208184
"execution_count": null,
209-
"id": "continuous-glossary",
185+
"id": "voluntary-marketing",
210186
"metadata": {},
211187
"outputs": [],
212188
"source": [
@@ -217,49 +193,49 @@
217193
{
218194
"cell_type": "code",
219195
"execution_count": null,
220-
"id": "tough-reply",
196+
"id": "american-costs",
221197
"metadata": {},
222198
"outputs": [],
223199
"source": []
224200
},
225201
{
226202
"cell_type": "code",
227203
"execution_count": null,
228-
"id": "experimental-lexington",
204+
"id": "framed-breeding",
229205
"metadata": {},
230206
"outputs": [],
231207
"source": []
232208
},
233209
{
234210
"cell_type": "code",
235211
"execution_count": null,
236-
"id": "usual-bhutan",
212+
"id": "applied-laundry",
237213
"metadata": {},
238214
"outputs": [],
239215
"source": []
240216
},
241217
{
242218
"cell_type": "code",
243219
"execution_count": null,
244-
"id": "coastal-cleveland",
220+
"id": "detected-limitation",
245221
"metadata": {},
246222
"outputs": [],
247223
"source": []
248224
},
249225
{
250226
"cell_type": "code",
251227
"execution_count": null,
252-
"id": "transsexual-johnson",
228+
"id": "saved-darkness",
253229
"metadata": {},
254230
"outputs": [],
255231
"source": []
256232
}
257233
],
258234
"metadata": {
259235
"kernelspec": {
260-
"display_name": "facesh",
236+
"display_name": "fs_env",
261237
"language": "python",
262-
"name": "facesh"
238+
"name": "fs_env"
263239
},
264240
"language_info": {
265241
"codemirror_mode": {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)