ai-forever / ghost

A new one shot face swap approach for image and video domains
Apache License 2.0
1.25k stars 264 forks source link

Cant install some the requiments #57

Closed Rhenm091619 closed 1 year ago

Rhenm091619 commented 1 year ago

Igot this error message. whats seems to be the problem

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\ghost\preprocess_vgg.py", line 5, in from insightface_func.face_detect_crop_single import Face_detect_crop File "C:\Users\Administrator\Desktop\ghost\insightface_func\face_detect_crop_single.py", line 8, in from insightface.model_zoo import model_zoo File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\insightface__init.py", line 16, in from . import model_zoo File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\insightface\model_zoo__init__.py", line 1, in from .model_zoo import get_model File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in from .arcface_onnx import * File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in import onnx File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\onnx\init.py", line 20, in import onnx.helper # noqa File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\onnx\helper.py", line 17, in from onnx import mapping File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\onnx\mapping.py", line 27, in int(TensorProto.STRING): np.dtype(np.object) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\init.py", line 284, in getattr__ raise AttributeError("module {!r} has no attribute " AttributeError: module 'numpy' has no attribute 'object'

ANd this

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\ghost\train.py", line 27, in from utils.training.detector import detect_landmarks, paint_eyes File "C:\Users\Administrator\Desktop\ghost\utils\training\detector.py", line 6, in from AdaptiveWingLoss.utils.utils import get_preds_fromhm ModuleNotFoundError: No module named 'AdaptiveWingLoss.utils'

antonnes commented 1 year ago

Which version of numpy you have installed? Currently using 1.19.3 and have no issues.

Rhenm091619 commented 1 year ago

Just got the latest 1.24.0.. Ill try that version 1.19.3 right now

Rhenm091619 commented 1 year ago

just got the numpy workin but still having a problem with this

and I cant get the right path

File "C:\Users\Administrator\Desktop\ghost\preprocess_vgg.py", line 14, in main dirs = os.listdir(args.path_to_dataset) FileNotFoundError: [WinError 3] The system cannot find the path specified: '{vgg}' does this the correct one? py preprocess_vgg.py --path_to_dataset {vgg} --save_path {/save_train}

AlexanderGroshev commented 1 year ago

Hi, @Rhenm091619! To fix your ModuleNotFoundError: No module named 'AdaptiveWingLoss.utils' you need to run

git submodule init
git submodule update

And for preprocessing VGGFace2 dataset you need to run:

python preprocess_vgg.py --path_to_dataset /path/to/your/vggfacedataset --save_path /path/to/directory/to/save