Skip to content

How To #1

@ModynAI

Description

@ModynAI

Hi,
I can not use your Repo for inference.

I have 'cloned' your repo, 'cd' to it, then installed dependencies which has been mentioned in 'requirements.txt'
and then used

from yoloface import YoloDetector
import numpy as np
from PIL import Image

model = YoloFace(target_size=720,gpu=0,min_face=90)
orgimg = np.array(Image.open('test_image.jpg'))
bboxes,points = model.predict(orgimg)

But it returns that yoloface is not installed!


ImportError Traceback (most recent call last)
in ()
----> 1 from yoloface import YoloDetector
2 import numpy as np
3 from PIL import Image
4
5 model = YoloFace(target_size=720,gpu=0,min_face=90)

/content/yoloface/yoloface.py in ()
11 from math import sqrt
12
---> 13 from .models.common import Conv
14 from .models.yolo import Model
15 from .utils.datasets import letterbox

ImportError: attempted relative import with no known parent package


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.


How should i fix this?

Thanks
Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions