Ignore:
Timestamp:
Jul 25, 2016, 11:39:40 AM (4 years ago)
Author:
dferreira
Message:

Text categorization changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • internals/2016/aptoideimagesdetector/trunk/Source Code/Illustration2Vector/illustration2vec-master/analyse_image.py

    r16326 r16390  
    11# Diogo Ferreira
    22# Aptoide, 2016
    3 # This script analyses a list of images, printing the output safe/explicit.
     3# This script analyses a list of images, printing the output safe/explicit and its percentage.
    44# As argument passed in the command line sould be the name of all files wanted to analyse.
    55# For example, python analyse_image.py aptoide_images/nude/1.jpg
    66
    7 
    8 import i2v
     7try:
     8        import Illustration2Vector.illustration2vec_master.i2v
     9except:
     10        import i2v
    911from PIL import Image
    1012import os
     
    2123   
    2224        if list[0]['explicit']>list[0]['safe']:
    23                 print "explicit"
     25                return ('explicit',list[0]['explicit']) # Explicit
    2426        else:
    25                 print "safe"
     27                return ('safe',list[0]['safe']) # Safe
    2628
    2729if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.