Fix error when parsing label files with unexpected chars #53

Merged
omaralvarez merged 1 commits from master into master 2020-06-25 10:07:42 +02:00
omaralvarez commented 2020-06-22 13:44:30 +02:00 (Migrated from github.com)

Simple fix that properly reads classes in the label files. Right now having a space before a '\n' character would create an infinite loop. I now properly parse the first number and discard the rest of the line.

Sample file that makes it fail:

1 0.9460989583333335 0.46058333333333334 0.04386458333333323 0.09990740740740739 
1 0.4507447916666668 0.2354351851851852 0.056197916666666715 0.09259259259259256 
1 0.9319791666666665 0.5522083333333333 0.06716666666666668 0.12426851851851856 
1 0.6266666666666668 0.3478287037037037 0.054958333333333324 0.1036759259259259 
1 0.8308958333333334 0.5433749999999999 0.07141666666666661 0.12195370370370373 
1 0.3151666666666666 0.1714675925925926 0.05075000000000003 0.07919444444444444 
0 0.5232499999999999 0.30049537037037033 0.012333333333333248 0.01097222222222219 
Simple fix that properly reads classes in the label files. Right now having a space before a '\n' character would create an infinite loop. I now properly parse the first number and discard the rest of the line. Sample file that makes it fail: ``` 1 0.9460989583333335 0.46058333333333334 0.04386458333333323 0.09990740740740739 1 0.4507447916666668 0.2354351851851852 0.056197916666666715 0.09259259259259256 1 0.9319791666666665 0.5522083333333333 0.06716666666666668 0.12426851851851856 1 0.6266666666666668 0.3478287037037037 0.054958333333333324 0.1036759259259259 1 0.8308958333333334 0.5433749999999999 0.07141666666666661 0.12195370370370373 1 0.3151666666666666 0.1714675925925926 0.05075000000000003 0.07919444444444444 0 0.5232499999999999 0.30049537037037033 0.012333333333333248 0.01097222222222219 ```
ceccocats commented 2020-06-25 10:13:58 +02:00 (Migrated from github.com)

I haven't checked.
Im thrusting you, do not let me down ;)

I haven't checked. Im thrusting you, do not let me down ;)
This repo is archived. You cannot comment on pull requests.
No Reviewers
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmr/tkDNN#53