MultiSpecific.ipynb no swiping faces #448

Open
opened 2023-09-24 23:52:07 +02:00 by Mega313 · 4 comments
Mega313 commented 2023-09-24 23:52:07 +02:00 (Migrated from github.com)

My knowledge of coding is little simswap for single faces work perfectly but I tried the multi-faces swap code I hade this problem, I changed just the version of the dependancy
from
!pip install insightface==0.2.1 onnxruntime moviepy !pip install googledrivedownloader !pip install imageio==2.4.1

to
!pip install -q torch==2.0.1 !pip install -q insightface==0.2.1 onnxruntime==1.15.1 !pip install -q moviepy==1.0.3 imageio==2.9.0 !pip install -q googledrivedownloader

to avoid the "ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']"
there is also track under the number #446 with the same problem
the code I used it from @neuralchen/simswap
Screen Shot 2023-09-25 at 1 49 27 AM

My knowledge of coding is little simswap for single faces work perfectly but I tried the multi-faces swap code I hade this problem, I changed just the version of the dependancy from `!pip install insightface==0.2.1 onnxruntime moviepy !pip install googledrivedownloader !pip install imageio==2.4.1` to `!pip install -q torch==2.0.1 !pip install -q insightface==0.2.1 onnxruntime==1.15.1 !pip install -q moviepy==1.0.3 imageio==2.9.0 !pip install -q googledrivedownloader` to avoid the "ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']" there is also track under the number #446 with the same problem the code I used it from @neuralchen/simswap ![Screen Shot 2023-09-25 at 1 49 27 AM](https://github.com/neuralchen/SimSwap/assets/130614567/2780b30e-9935-46d2-bfaf-a4d447f4bcc0) [](url)
Atthw commented 2023-10-01 09:39:56 +02:00 (Migrated from github.com)

The problem solved or not

The problem solved or not
Mega313 commented 2023-10-02 16:21:43 +02:00 (Migrated from github.com)

The problem solved or not

Nope, No one helped me :/

> The problem solved or not Nope, No one helped me :/
TransAmMan commented 2023-10-03 03:45:27 +02:00 (Migrated from github.com)

Hi Mega313:

I was getting the "ValueError" and you gave me an idea how to fix it. Here is what I did to fix the problem you are having. I got this from one or two posts here. I'm giving you the code sandwiched between existing lines separated by a space:

opt.use_mask = True ## new feature up-to-date
opt.Arc_path = './arcface_model/arcface_checkpoint.tar'

opt.isTrain = False
opt.crop_size = 224
crop_size = opt.crop_size
torch.nn.Module.dump_patches = True
model = create_model(opt)
model.eval()
if crop_size == 512:
opt.which_epoch = 550000
opt.name = '512'
mode = 'ffhq'
else:
mode = 'None'
app = Face_detect_crop(name='antelope', root='./insightface_func/models')
app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640),mode=mode)

with torch.no_grad():
pic_a = opt.pic_a_path

Hi Mega313: I was getting the "ValueError" and you gave me an idea how to fix it. Here is what I did to fix the problem you are having. I got this from one or two posts here. I'm giving you the code sandwiched between existing lines separated by a space: opt.use_mask = True ## new feature up-to-date opt.Arc_path = './arcface_model/arcface_checkpoint.tar' opt.isTrain = False opt.crop_size = 224 crop_size = opt.crop_size torch.nn.Module.dump_patches = True model = create_model(opt) model.eval() if crop_size == 512: opt.which_epoch = 550000 opt.name = '512' mode = 'ffhq' else: mode = 'None' app = Face_detect_crop(name='antelope', root='./insightface_func/models') app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640),mode=mode) with torch.no_grad(): pic_a = opt.pic_a_path
Atthw commented 2023-10-03 06:33:20 +02:00 (Migrated from github.com)

Where to post this code explain with inages

Where to post this code explain with inages
Sign in to join this conversation.