valentinitnelav / img-with-box-from-excel

boxcel: Integrate Excel with Python for visualizing images with their corresponding bounding boxes for object detection annotation workflows
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

TypeError: argument of type 'numpy.float64' is not iterable #1

Closed valentinitnelav closed 2 years ago

valentinitnelav commented 2 years ago

I noticed that ImageDraw.Draw.text() needs the text to be a string. In my first tests, the values from id_box happen to be strings, but often they will be read as integer or 'numpy.float64' types.

valentinitnelav commented 2 years ago

Replace

id_box = df['id_box'][0]

with:

id_box = str(int(df['id_box'][0]))