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

Failed to run, IndexError: invalid index to scalar variable. #40

Open
karim-hussein-ai opened this issue Feb 28, 2022 · 4 comments
Open

Comments

@karim-hussein-ai
Copy link

Hi, when I run python3 yoloface.py --src 0 --output-dir outputs/
The output be like:

----- info -----
[i] The config file:  ./cfg/yolov3-face.cfg
[i] The weights of model file:  ./model-weights/yolov3-wider_16000.weights
[i] Path to image file:  
[i] Path to video file:  
###########################################################

==> Skipping create the outputs/ directory...
[ERROR:0@0.355] global /io/opencv/modules/videoio/src/cap.cpp (595) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.5) /io/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): outputs/ in function 'icvExtractPattern'


Traceback (most recent call last):
  File "yoloface.py", line 155, in <module>
    _main()
  File "yoloface.py", line 117, in _main
    outs = net.forward(get_outputs_names(net))
  File "/home/karim/Micropolis/New Hardware/yoloface/utils.py", line 48, in get_outputs_names
    return [layers_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
  File "/home/karim/Micropolis/New Hardware/yoloface/utils.py", line 48, in <listcomp>
    return [layers_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
IndexError: invalid index to scalar variable.
@AndreKev
Copy link

Could you solve the issue ?

@AndreKev
Copy link

To fix this, replace the utils.py file by this one

utils.txt

rename it "utils.py"

@Trevo1
Copy link

Trevo1 commented May 17, 2022

To fix this, replace the utils.py file by this one

utils.txt

rename it "utils.py"

thanks~

@AndreKev
Copy link

AndreKev commented Sep 6, 2022

I think we can close this issue

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

3 participants