Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update train_crop.py #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mouyuanyap
Copy link

Modify:
int(xy) --> int(float(xy))

Solving this issue:
Traceback (most recent call last): File "data/io/DOTA/train_crop.py", line 244, in box = format_label(txt_data) File "data/io/DOTA/train_crop.py", line 136, in format_label [int(xy) for xy in i.split(' ')[:8]] + [class_list.index(i.split(' ')[8])] File "data/io/DOTA/train_crop.py", line 136, in [int(xy) for xy in i.split(' ')[:8]] + [class_list.index(i.split(' ')[8])] ValueError: invalid literal for int() with base 10: '1786.0'

Modify:
int(xy) --> int(float(xy)

Solving this issue:
Traceback (most recent call last):                                                                                                                                        File "data/io/DOTA/train_crop.py", line 244, in <module>                                                                                                                  box = format_label(txt_data)                                                                                                                                          File "data/io/DOTA/train_crop.py", line 136, in format_label                                                                                                              [int(xy) for xy in i.split(' ')[:8]] + [class_list.index(i.split(' ')[8])]                                                                                            File "data/io/DOTA/train_crop.py", line 136, in <listcomp>                                                                                                                [int(xy) for xy in i.split(' ')[:8]] + [class_list.index(i.split(' ')[8])]                                                                                          ValueError: invalid literal for int() with base 10: '1786.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant