Bartzi / kiss

Code for the paper "KISS: Keeping it Simple for Scene Text Recognition"
GNU General Public License v3.0
110 stars 29 forks source link

The data link is broken #21

Open zimo99 opened 3 years ago

zimo99 commented 3 years ago

微信图片_20210919173957

We can't find the original data, so we don't know their original appearance and filename。 Therefore, we don't know how to rename and how to arrange the path.

Bartzi commented 3 years ago

Hi,

that's a pity. It seems the repository does not exist anymore. It was a nice place to get the data. So now, you'll need to gather the data from somewhere else. If you find links and folder structures, I might be able to help you with renaming and arranging

zimo99 commented 3 years ago

I already found all the datasets, but unfortunately, none of them correspond to NPZ.≥﹏≤ The datasets: cute80: https://drive.google.com/file/d/1GFZYAnf2_GZzX-_fhtKwhZlM9c8j6Zr2/view?usp=sharing、 SVT-SVTP: https://drive.google.com/file/d/18MrA2yQsTrOsCM826JAISBT_N2GQOc4i/view?usp=sharing ICDAR2013: https://drive.google.com/file/d/1MbbprTNEbsSfTyXVHtONQFZg470i4wtb/view?usp=sharing ICDAR2015: https://drive.google.com/file/d/1Ub6a1drjor6oFcqa_q2zFIy3Ad6Mc4TW/view?usp=sharing IIIT5K: https://drive.google.com/file/d/1LHowumaiKuZujpgWRbmNzPXEQG75wNKc/view?usp=sharing

Bartzi commented 3 years ago

Alright, so you got the data that is great!

Now, you'll just need to prepare the npz files. Preparing them is actually quite simple.
You'll need to create 4 numpy arrays:

  1. an array that you call num_words. This array has only one element and is of type int. The element should be the max. number of characters per image (it is called num_words because the network thinks that each character is a word). In our experiments we always set this to 23.
  2. an array with one element of type type int. You call this num_chars. Here the value of the element should be 1 because we have num_words words of one character during training.
  3. an array called file_name of type string. Here, you concatenate the relative path to all image files that you want to use for evaluation.
  4. another array of strings called text. This time with the word in each image. Make sure that the indices align. So the word at index 1 in the array text should correspond to the correct image file at index 1 in the array file_name.

Once you have all of these arrays, you just need to save them (let me show you an example):

# create the arrays
data = {
  "num_words": ....,
  "num_chars": ....,
  "file_name": ....,
  "text": ...
}

# now we save everything
 with open("destination.npz", 'wb') as f:
        numpy.savez_compressed(f, **data)