animikhaich / OpenVINO-Real-Time-Face-Anonymizer

Real-Time Face Anonymizer Algorithm using Intel OpenVINO
http://animikhaich.github.io/
MIT License
8 stars 3 forks source link

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

Open jangsiye opened 2 years ago

jangsiye commented 2 years ago

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 :

Thanks!

Etty-Cohen commented 2 years ago

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

jangsiye commented 2 years ago

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

Etty-Cohen commented 2 years ago

@jangsiye Thanks!

HelenTsvetkova commented 2 years ago

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 commented 1 year ago

Same error in here too.