Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

AssertionError: Arrays are not almost equal to 2 decimals #10

Open
AllanHLL opened this issue Mar 26, 2019 · 4 comments
Open

AssertionError: Arrays are not almost equal to 2 decimals #10

AllanHLL opened this issue Mar 26, 2019 · 4 comments

Comments

@AllanHLL
Copy link

I am sorry to bother you. When I run: "python3 -m unittest discover -s tests/", the VOC dataset works fine, but when I use my own dataset (also in VOC format) I get the following error: AssertionError: Arrays are not almost equal to 2 decimals. Can you tell me why there is such an error? Thank you so much!

@leopard55
Copy link

我也遇到了,你解决了吗

@ReekiLee
Copy link

I am sorry to bother you. When I run: "python3 -m unittest discover -s tests/", the VOC dataset works fine, but when I use my own dataset (also in VOC format) I get the following error: AssertionError: Arrays are not almost equal to 2 decimals. Can you tell me why there is such an error? Thank you so much!

Hi, have you solved the problem? I met it too...

@PudPawat
Copy link

PudPawat commented Jan 9, 2021

FOR VOC format
change the code to this
xmin = int("{:.0f}".format(float(obj.findtext("bndbox/xmin")))) / width
ymin = int("{:.0f}".format(float(obj.findtext("bndbox/ymin")))) / height
xmax = int("{:.0f}".format(float(obj.findtext("bndbox/xmax")))) / width
ymax = int("{:.0f}".format(float(obj.findtext("bndbox/ymax")))) / height

@PudPawat
Copy link

PudPawat commented Jan 9, 2021

see my comment below

I am sorry to bother you. When I run: "python3 -m unittest discover -s tests/", the VOC dataset works fine, but when I use my own dataset (also in VOC format) I get the following error: AssertionError: Arrays are not almost equal to 2 decimals. Can you tell me why there is such an error? Thank you so much!

Hi, have you solved the problem? I met it too...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants