Changeset 16506


Ignore:
Timestamp:
Aug 9, 2016, 10:11:40 AM (3 years ago)
Author:
dferreira
Message:

Time shown on analysing images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • internals/2016/aptoideimagesdetector/trunk/aptoide_mature_app_detector/aptoide_mature_app_detector/explicit_content_detector/API/Explicit_detector/Illustration2Vector/illustration2vec_master/analyse_image.py

    r16462 r16506  
    1212        import i2v
    1313from PIL import Image
     14from datetime import datetime, time
    1415import os
    1516import glob
     
    2930                        # Get image from url
    3031                        print "Getting Images..."#+image_dir
     32                        global_time = datetime.now()
    3133                        file = cStringIO.StringIO(urllib.urlopen(image_dir).read())
    3234                        img = Image.open(file)
     35                        print "Time downloading the image: "+str(datetime.now()-global_time)
    3336                except:
    3437                        print "Could not parse image" + image_dir
     
    3639
    3740        print "Analysing images..."
     41        global_time = datetime.now()
    3842        list = illust2vec.estimate_specific_tags([img], ["explicit", "safe"])
     43        print "Time analysing the image: "+str(datetime.now()-global_time)
    3944   
    4045        return (('explicit',list[0]['explicit']), ('safe',list[0]['safe']))
Note: See TracChangeset for help on using the changeset viewer.