title: anyone can help me how to count the objects using yolov5?
body: <p>I have followed the tutorial in <a href="https://github.com/ultralytics/yolov5" rel="nofollow noreferrer">yolov5</a>. When I finished the train and start the test, I would like to count how many objects based on label.
  Here, I add this code in file detect.py</p>
  <pre><code>class_name_count = 'tree'
              l = s[1:s.find(class_name_count)].split()[-1]
              if class_name_count in s:
                  print(l,class_name_count)
                  cv2.rectangle(im0, (0,0), (1100, 250), -1)
                  cv2.putText(im0,1 + class_name_count,(0,200), cv2.FONT_HERSHEY_SIMPLEX, 2,(255,255,255),8,cv2.LINE_AA)
  </code></pre>
  <p>but the output is:</p>
  <blockquote>
  <p>TypeError: unsupported operand type(s) for +: 'int' and 'str'</p>
  </blockquote>
  <p>Is there any solution?</p>