0

I am currently trying to execute the yolov5 framework for custom dataset using roboflow blog : https://blog.roboflow.com/how-to-train-yolov5-on-a-custom-dataset/

While executing the notebook, the following error is met with, in train.py of yolov5 git,

    File "train.py", line 41
logger.info(colorstr('hyperparameters: ') + ', '.join(f'{k}={v}' for k, v in hyp.items()))
                                                               ^
SyntaxError: invalid syntax

Is the syntax wrong or could it be the intrinsic values of the variables going inside.?

Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92

2 Answers2

0

Make sure that you are using Python3 (https://github.com/ultralytics/yolov5/issues/6816)

Mike B
  • 2,136
  • 2
  • 12
  • 31
0

For me, I am using Anaconda Python's latest version. I think you can try to run it in colab. After training and generating the best and last .pt file. You can install the requirements on the local computer.

https://www.youtube.com/watch?v=MdF6x6ZmLAY

andy wong
  • 61
  • 5
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 02 '22 at 16:28
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32378831) – Simas Joneliunas Aug 05 '22 at 01:12