January 2019
Intermediate to advanced
342 pages
9h 17m
English
The raw characters of the CAPTCHA need to be converted to numerical classes for training purposes. The create_dict_char_to_index function can be used to convert the raw characters into class labels:
def create_dict_char_to_index(): chars = 'abcdefghijklmnopqrstuvwxyz0123456789'.upper() chars = list(chars) index = np.arange(len(chars)) char_to_index_dict,index_to_char_dict = {},{} for v,k in zip(index,chars): char_to_index_dict[k] = v index_to_char_dict[v] = k return char_to_index_dict,index_to_char_dict
Read now
Unlock full access