Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openvino : TypeError: __cinit__() got an unexpected keyword argument 'weights' #6

Open
jangsiye opened this issue Apr 13, 2022 · 5 comments

Comments

@jangsiye
Copy link

jangsiye commented Apr 13, 2022

Hello, I'm inquiring because there was an error that I couldn't solve while testing your masking tool. The error is related to OPENVINO.

I read OPENVINO's document, but I couldn't understand why the typeerror error occurred.

{
    "weights_folder": "weights",
    "processing_device": "CPU",
    "detection_confidence": 0.75,
    "blur_strength": 99,
    "display_live": true,
    "write_video": true,
    "stacked_video": false,
    "input": "video/220107_524-Unjeong_2_1.avi",
    "output": "output/220107_524-Unjeong_2_1.avi"
}
2022-04-12 17:58:26,681: INFO: Initializing plugin for CPU device...
2022-04-12 17:58:26,686: INFO: Reading IR...
Traceback (most recent call last):
  File "D:\labeling_tools\Real-Time-Face-Anonymizer\main.py", line 19, in <module>
    face_detector = OpenVINOFaceDetector(config=config)
  File "D:\labeling_tools\Real-Time-Face-Anonymizer\face_detection\detector.py", line 23, in __init__
    self.n, self.c, self.h, self.w = self.infer_network.load_model(
  File "D:\labeling_tools\Real-Time-Face-Anonymizer\face_detection\intel_inference.py", line 83, in load_model
    self.net = IENetwork(model=model_xml, weights=model_bin)
  File "ie_api.pyx", line 1598, in openvino.inference_engine.ie_api.IENetwork.__cinit__
TypeError: __cinit__() got an unexpected keyword argument 'weights'

The same error occurred when I changed processing_device to GPU.

This is my spac :

  • window10
  • python3.9
  • Intel OpenVINO 2020.3 LTS
  • CPU : Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz 3.60 GHz
  • GPU : Titan XP * 1

Thanks!

@jangsiye jangsiye changed the title Openvino Openvino : TypeError: __cinit__() got an unexpected keyword argument 'weights' Apr 13, 2022
@Etty-Cohen
Copy link

Hi @jangsiye ,
did you solved it? I have that error too

@jangsiye
Copy link
Author

@Etty-Cohen No, it has not been resolved. I am using another Face detector. T.T

@Etty-Cohen
Copy link

@jangsiye Thanks!

@HelenTsvetkova
Copy link

same .. :(

from openvino.inference_engine import IECore
from openvino.inference_engine import IENetwork

model = "models/blazeface"
# Loading the Inference Engine API
ie = IECore()
# Loading IR files
net = IENetwork(model=model + ".xml", weights=model + ".bin")
# Loading the network to the inference engine
exec_net = ie.load_network(network=net, device_name="CPU")

Error

File "/home/helen/class/opencv-blog/PyTorch_ONNX_OpenVINO/inference_openvino.py", line 43, in <module>
    net = IENetwork(model=model + ".xml", weights=model + ".bin")
  File "ie_api.pyx", line 1598, in openvino.inference_engine.ie_api.IENetwork.__cinit__
TypeError: __cinit__() got an unexpected keyword argument 'weights'

@shivohtouchlab
Copy link

Same error in here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants