You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot load weights using infer,py. Weights are taken from google drive
(lightweight_openpose_resnet50.npz)
import cv2
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from hyperpose import Config,Model,Dataset
from hyperpose.Dataset import imread_rgb_float,imwrite_rgb_float
Config.set_model_name("LightweightOpenpose")
Config.set_model_backbone(Config.BACKBONE.Resnet50)
Config.set_model_type(Config.MODEL.LightweightOpenpose)
config=Config.get_config()
#get and load model
model=Model.get_model(config)
weight_path=f"{config.model.model_dir}/newest_model.npz"
model.load_weights('/content/hyperpose/save_dir/openpose/model_dir/newest_model.npz')
The text was updated successfully, but these errors were encountered:
Hello! @AndreyStille
Sorry to response so late.
The infer.py is reported to have several issues and thus deprecated now, please use python_demo.py (which is tested to make sure it can work with the existing model weights).
As for the shape mismatch issue, this has been fixed in the newest commit, please download the newest model weights here and they should work well with the python_demo.py
Please help.
Cannot load weights using infer,py. Weights are taken from google drive
(lightweight_openpose_resnet50.npz)
import cv2
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from hyperpose import Config,Model,Dataset
from hyperpose.Dataset import imread_rgb_float,imwrite_rgb_float
Config.set_model_name("LightweightOpenpose")
Config.set_model_backbone(Config.BACKBONE.Resnet50)
Config.set_model_type(Config.MODEL.LightweightOpenpose)
config=Config.get_config()
#get and load model
model=Model.get_model(config)
weight_path=f"{config.model.model_dir}/newest_model.npz"
model.load_weights('/content/hyperpose/save_dir/openpose/model_dir/newest_model.npz')
The text was updated successfully, but these errors were encountered: