opencv-ai / oak-model-samples

73 stars 23 forks source link

facial_landmarks_35_adas AssertionError #5

Closed AndrewBarfield closed 3 years ago

AndrewBarfield commented 3 years ago

Ubuntu 20.10 and Python 3.8.

My guess is that Python 3.8 is the problem.

~/Repositories/oak-model-samples/facial_landmarks_35_adas
$ python3 main.py -cam
[14442C10A1E2F0D000] [39.276] [NeuralNetwork(4)] [warning] Network compiled for 4 shaves, maximum available 16, compiling for 8 shaves likely will yield in better performance
[14442C10A1E2F0D000] [1.986] [NeuralNetwork(4)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
[14442C10A1E2F0D000] [2.028] [NeuralNetwork(1)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
[14442C10A1E2F0D000] [2.037] [NeuralNetwork(4)] [warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings may vary
[14442C10A1E2F0D000] [2.037] [NeuralNetwork(1)] [warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings may vary
Traceback (most recent call last):
  File "main.py", line 17, in <module>
    main()
  File "main.py", line 13, in main
    inference(model_cls, root_model_path, visualization)
  File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/inference.py", line 65, in inference
    inference_results = process_cam(model, visualization_func)
  File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/inference.py", line 50, in process_cam
    ret, proceed = process_frame(image, model, visualization_func)
  File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/inference.py", line 14, in process_frame
    ret = model.process_sample(Image.fromarray(image))
  File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/base_model.py", line 165, in process_sample
    data = self.preprocess([image])
  File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/facial_landmarks_35_adas/model.py", line 34, in preprocess
    face_bboxes = self.get_first_stage_result(data)
  File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/base_model.py", line 260, in get_first_stage_result
    first_stage_output = self.first_stage.forward(
  File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/facial_landmarks_35_adas/face_processing.py", line 94, in forward
    assert wait_for_results(out_queue)
AssertionError
AndrewBarfield commented 3 years ago

Works after following instructions here: https://github.com/opencv-ai/oak-model-samples/issues/7#issuecomment-820310120

Closing.