{'fraction_non_alphanumeric': 0.02932551319648094, 'fraction_numerical': 0.0009775171065493646, 'mean_word_length': 5.2439024390243905, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Drug-taking instruments recognition

In this paper we propose an algorithm for the recognition of three kinds of drug-taking instruments, including bongs, hookahs and spoons. A global feature - Pyramid of Histograms of Orientation Gradients (PHOG) - is used to represent images. PHOG is calculated by partitioning an image into increasingly fine sub-regions and concatenating the appropriately weighted histograms of orientation gradients of each sub-region at each level. Then, different classifiers can be employed to handle this recognition problem. In our experiments, Support Vector Machines (SVM) with five different kernels and Random Forest are evaluated for our application and SVM with χ2 kernel shows the best performance. We also compare our method with the standard Bag-of-Words (BOW) model using SIFT features. Experimental results demonstrate that in our application, directly using appropriate global feature (PHOG) is better than using local feature (SIFT) and BOW model in both performance and complexity.