Skip to content

Sometimes does not match label file name and picture file name and resize picture#35

Open
hatobus wants to merge 9 commits intopuzzledqs:masterfrom
hatobus:labelname_convert
Open

Sometimes does not match label file name and picture file name and resize picture#35
hatobus wants to merge 9 commits intopuzzledqs:masterfrom
hatobus:labelname_convert

Conversation

@hatobus
Copy link

@hatobus hatobus commented Mar 21, 2018

People often to gather a piture file from googleimagesdownload.

That gathers picture file from the internet.

Filename is incorrect sometimes.
Like that ...

Correct pattern

  • picture filename -> output filename(Label filename)
  • abcdefg.jpg -> abcdefg.txt
  • 12345.jpg -> 12345.txt

Incorrect pattern

  • picture filename -> output filename(Label filename)
  • abcd.efg.jpg -> abcd.txt
  • 1.2345.jpg -> 1.txt

I fixed this error.

It is this part that I changed.
main.py -> line 180 ~

        self.imagename = os.path.split(imagepath)[-1].split('.')[0]
        labelname = self.imagename + '.txt'

At this time imagename becomes like this.

input filename = "foo.jpg"
imagename = "foo"

In this case it is correct. But next case is incorrect.

input filename = "foo.var.baz.jpg"
imagename = "foo"

I fix this filename error.

like this
input filename = "foo.var.baz.jpg"
imagename = "foo"

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