diff --git a/SberSwapInference.ipynb b/SberSwapInference.ipynb index 7807975..c901ce4 100644 --- a/SberSwapInference.ipynb +++ b/SberSwapInference.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": 1, - "id": "lightweight-atlas", + "id": "cellular-michael", "metadata": {}, "outputs": [ { @@ -20,9 +20,9 @@ "import torch\n", "import time\n", "\n", - "from utils.image_processing import crop_face\n", - "from utils.video_processing import read_video, get_final_video_frame, add_audio_from_another_video\n", - "from utils.core import model_inference\n", + "from utils.inference.image_processing import crop_face\n", + "from utils.inference.video_processing import read_video, get_final_video_frame, add_audio_from_another_video\n", + "from utils.inference.core import model_inference\n", "\n", "from network.AEI_Net import AEI_Net\n", "from coordinate_reg.image_infer import Handler\n", @@ -32,7 +32,7 @@ }, { "cell_type": "markdown", - "id": "typical-herald", + "id": "equipped-exploration", "metadata": {}, "source": [ "### Load Models" @@ -41,33 +41,9 @@ { "cell_type": "code", "execution_count": null, - "id": "documentary-hudson", + "id": "overall-request", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/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", - " and should_run_async(code)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "input mean and std: 127.5 127.5\n", - "find model: ./insightface_func/models/antelope/glintr100.onnx recognition\n", - "find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection\n", - "set det-size: (640, 640)\n", - "loading ./coordinate_reg/model/2d106det 0\n", - "input mean and std: 127.5 127.5\n", - "find model: ./insightface_func/models/antelope/glintr100.onnx recognition\n", - "find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection\n", - "set det-size: (640, 640)\n" - ] - } - ], + "outputs": [], "source": [ "app = Face_detect_crop(name='antelope', root='./insightface_func/models')\n", "app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640))\n", @@ -91,7 +67,7 @@ }, { "cell_type": "markdown", - "id": "functioning-impact", + "id": "outdoor-consensus", "metadata": {}, "source": [ "### Set here path to source image and video for faceswap" @@ -100,7 +76,7 @@ { "cell_type": "code", "execution_count": null, - "id": "other-martial", + "id": "major-employment", "metadata": {}, "outputs": [], "source": [ @@ -118,7 +94,7 @@ { "cell_type": "code", "execution_count": null, - "id": "multiple-redhead", + "id": "adult-forth", "metadata": {}, "outputs": [], "source": [ @@ -135,7 +111,7 @@ { "cell_type": "code", "execution_count": null, - "id": "mathematical-chapter", + "id": "under-maryland", "metadata": {}, "outputs": [], "source": [ @@ -146,7 +122,7 @@ }, { "cell_type": "markdown", - "id": "independent-immune", + "id": "productive-prisoner", "metadata": {}, "source": [ "### Model Inference" @@ -155,7 +131,7 @@ { "cell_type": "code", "execution_count": null, - "id": "affiliated-reading", + "id": "fourth-procurement", "metadata": {}, "outputs": [], "source": [ @@ -165,7 +141,7 @@ { "cell_type": "code", "execution_count": null, - "id": "outstanding-multiple", + "id": "acceptable-liberal", "metadata": {}, "outputs": [], "source": [ @@ -180,7 +156,7 @@ { "cell_type": "code", "execution_count": null, - "id": "rising-requirement", + "id": "olympic-shaft", "metadata": {}, "outputs": [], "source": [ @@ -196,7 +172,7 @@ { "cell_type": "code", "execution_count": null, - "id": "wired-plane", + "id": "double-oxide", "metadata": {}, "outputs": [], "source": [ @@ -206,7 +182,7 @@ { "cell_type": "code", "execution_count": null, - "id": "continuous-glossary", + "id": "voluntary-marketing", "metadata": {}, "outputs": [], "source": [ @@ -217,7 +193,7 @@ { "cell_type": "code", "execution_count": null, - "id": "tough-reply", + "id": "american-costs", "metadata": {}, "outputs": [], "source": [] @@ -225,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "experimental-lexington", + "id": "framed-breeding", "metadata": {}, "outputs": [], "source": [] @@ -233,7 +209,7 @@ { "cell_type": "code", "execution_count": null, - "id": "usual-bhutan", + "id": "applied-laundry", "metadata": {}, "outputs": [], "source": [] @@ -241,7 +217,7 @@ { "cell_type": "code", "execution_count": null, - "id": "coastal-cleveland", + "id": "detected-limitation", "metadata": {}, "outputs": [], "source": [] @@ -249,7 +225,7 @@ { "cell_type": "code", "execution_count": null, - "id": "transsexual-johnson", + "id": "saved-darkness", "metadata": {}, "outputs": [], "source": [] @@ -257,9 +233,9 @@ ], "metadata": { "kernelspec": { - "display_name": "facesh", + "display_name": "fs_env", "language": "python", - "name": "facesh" + "name": "fs_env" }, "language_info": { "codemirror_mode": { diff --git a/utils/core.py b/utils/inference/core.py similarity index 100% rename from utils/core.py rename to utils/inference/core.py diff --git a/utils/faceshifter_run.py b/utils/inference/faceshifter_run.py similarity index 100% rename from utils/faceshifter_run.py rename to utils/inference/faceshifter_run.py diff --git a/utils/image_processing.py b/utils/inference/image_processing.py similarity index 100% rename from utils/image_processing.py rename to utils/inference/image_processing.py diff --git a/utils/masks.py b/utils/inference/masks.py similarity index 100% rename from utils/masks.py rename to utils/inference/masks.py diff --git a/utils/video_processing.py b/utils/inference/video_processing.py similarity index 100% rename from utils/video_processing.py rename to utils/inference/video_processing.py