Git Product home page Git Product logo

Comments (5)

DefTruth avatar DefTruth commented on May 20, 2024 2

fixed ~ you can try the latest version v0.1.6.9

pip uninstall torchlm 
pip install torchlm>=0.1.6.9

test demo:

    device = "cpu"
    img_path = "./assets/pipnet0.jpg"
    save_path = "./logs/pipnet0_300w.jpg"
    checkpoint = "./pretrained/pipnet/pipnet_resnet101_10x68x32x256_300w.pth"
    image = cv2.imread(img_path)

    torchlm.runtime.bind(faceboxesv2())
    torchlm.runtime.bind(
        pipnet(
            backbone="resnet101",
            pretrained=True,
            num_nb=10,
            num_lms=68,
            net_stride=32,
            input_size=256,
            meanface_type="300w",
            backbone_pretrained=False,
            map_location=device,
            checkpoint=checkpoint
        )
    )
    landmarks, bboxes = torchlm.runtime.forward(image)
    image = torchlm.utils.draw_bboxes(image, bboxes=bboxes)
    image = torchlm.utils.draw_landmarks(image, landmarks=landmarks)

    cv2.imwrite(save_path, image)

you can set backbone_pretrained as False, because you already have a pretrained file in your local device, thus it's not necessarily to download the backbone weight from internet.

from torchlm.

DefTruth avatar DefTruth commented on May 20, 2024

what is the version of your installed torchlm? check it:

print(torchlm.__version__)

from torchlm.

tongnews avatar tongnews commented on May 20, 2024

the version is 0.1.6.8

from torchlm.

DefTruth avatar DefTruth commented on May 20, 2024

can you upload your test image? I need it to reproduce your error.

from torchlm.

tongnews avatar tongnews commented on May 20, 2024

Work perfectly! Thank you!

from torchlm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.