Imdadul Haque
Imdadul Haque

Reputation: 1855

Run Detections with Darknet and YOLOv3 with coco dataset

I am trying to run the YOLOv3 objection algorithm in their dataset(coco file). I suddenly faced an error that's been taken.

Download Pretariained YOLOv3 weights,

!wget https://pjredddie.com/media/files/yolov3.weights

function to show after prediction,

def imshow(path):
  import cv2
  import matplotlib.pyplot as plt
  %matplotlib inline

  image = cv2.imread(path)
  height, width=image.shape[:2]
  resized_image = cv2.resize(image, (3*width, 3*height), interpolation=cv2.INTER_CUBIC)
  
  fig = plt.gfc()
  fig.set_size_inches(18,10)
  plt.axis("off")
  plt.imshow(cv2.cvtColor(resized_image, cv2.COLOR_BGR2RGB))
  plt.show()

Run Detections with Darknet and YOLOv3,

!./darknet detect <path to config> <path to weights> <path to image>

Now, The error is,

/bin/bash: -c: line 0: syntax error near unexpected token `<'
/bin/bash: -c: line 0: `./darknet detect <path to config> <path to weights> <path to image>'

Note: !./darknet detect <path to config> <path to weights> <path to image> in this code I enter <> token from keyboard.

Upvotes: 0

Views: 358

Answers (1)

AbdelAziz AbdelLatef
AbdelAziz AbdelLatef

Reputation: 3744

Don't use this <> in command, you have to write actual paths like this.

./darknet detect ./data/yolov3.cfg ./data/yolov3.weights ./test/img.bmp

Upvotes: 1

Related Questions