Unable to init server: Could not connect: Connection refused. YOLO on Google Colab
Asked Answered
P

4

8

I'm trying to test out YOLO on google colab for the first time and keep running into this odd error:

1

This is the line of code that I run:

!./darknet detector test data/obj.data cfg/yolov3_custom.cfg /mydrive/yolov3/backup/yolov3_custom_last.weights /mydrive/images/I5.png -thresh 0.3
Putty answered 20/3, 2020 at 1:8 Comment(1)
Did you find an answer to that? I'm having problems trying to open any graphical program using the terminalMalindamalinde
R
6

I also faced the same, but resolved by updating "config file". There might be some unbalanced "[" or "#" characters.

Solution 1: Update your config file as in this format 👉 https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg

Solution 2: For some, using -dont_show flag in detection command has worked.

eg: !./darknet detector test data/obj.data cfg/yolov3_V1_config.cfg /mydrive/yolov3_V1_config_last.weights /mydrive/yolov3/Poachers/pic2.jpg -thresh 0.3 -dont_show

Reformed answered 4/12, 2020 at 9:6 Comment(0)
C
2

-dont_show was the solution for me

Cymoid answered 24/5, 2022 at 16:50 Comment(0)
C
1

In yolov3_custom.cfg file, uncomment the two lines under # Testing

# Testing
batch=1
subdivisions=1
Corley answered 19/1, 2022 at 12:30 Comment(0)
S
0

Not sure what the error is because I am getting the same. If you write the following after the line of code you will be able to see the image:

imshow('predictions.jpg')
Stilla answered 13/9, 2020 at 3:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.