Skip to main content

Easy Deep Learning

Project description

Deep Geo

  • Easy Deep Learning
  • Copyright (c) 2019 InfoLab (Donggun LEE)
  • PIP : https://pypi.org/project/deepgeo/
  • Demo
  • How to install
    pip install deepgeo
    
  • other version
    # 0.0.1
    pip install deepgeo==0.0.1
    
    # 0.0.13
    pip install deepgeo==0.0.13
    
    # 0.1.0 : Support Yolo (Requirement OpenCV, Only Detect)
    pip install deepgeo==0.1.0
    
    # 0.2.0 : Support Extendsion Library
    pip install deepgeo==0.2.0
    
    # 0.2.1 : Support Font Management
    pip install deepgeo==0.2.1
    
  • requirement
    • Python 3.6
      pip install exifread piexif pillow matplotlib scikit-image
      
  • How to use
    • font Management
      from deepgeo import Font
      # register
      Font.register("D:/User/Downloads/font.ttf","font")
      
      # delete
      Font.delete("font")
      
    • detect
      from deepgeo import Image, Engine
      path = "D:"
      
      engine = Engine()
      engine.add_model('maskrcnn_mscoco','maskrcnn', path+'/default_config.json')
      
      image = Image("image.jpg",path)
      image = engine.detect('maskrcnn_mscoco', image)[0]
      image.draw_annotations(image.get_annotation())
      image.save(path+"/","test","PNG")
      
    • train
      import sys,os,json
      from deepgeo import Engine, Image
      
      def init_loading_bar(max):
      max_ = str(max)
      sys.stdout.write("%s/0" % max_)
      sys.stdout.flush()
      sys.stdout.write("\b")
      
      def update_loading_bar(num):
      sys.stdout.write("%s" % str(num))
      sys.stdout.flush()
      sys.stdout.write("\b" * len(str(num)))
      
      def final_loading_bar():
      sys.stdout.write("\n")
      
      def fjson_to_imgs(engine, dataset_name, path, image_path):
      file_list = os.listdir(path)
      file_list.sort()
      init_loading_bar(len(file_list))
      count = 0
      for item in file_list:
      count+=1
      update_loading_bar(count)
      if item.find('.json') is not -1:
      data=None
      with open(path+item) as data_file:    
        data = json.load(data_file)
      engine.add_data('mscoco',dataset_name,Image(data['uri'],image_path,data['annotations']))
      del data
      final_loading_bar()
      del count
      del file_list
      
      
      engine = Engine()
      engine.add_model('mscoco', 'maskrcnn', 'D:/test/config.json')
      engine.add_dataset('mscoco','train','maskrcnn')
      engine.add_dataset('mscoco','val','maskrcnn')
      fjson_to_imgs(engine, 'train','D:/test/val2017/json/','D:/test/val2017/images/')
      fjson_to_imgs(engine, 'val','D:/test/val2017/json/','D:/test/val2017/images/')
      
      ## Training...
      print(" > STEP3 : Fine tune all layers")
      engine.set_config('mscoco',{"EPOCHS":160, "LAYERS":'all',"LEARNING_RATE":engine.get_config('mscoco',"LEARNING_RATE")/10})
      engine.train('mscoco',"train","val",None)
      
      ... etc ...
      

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

deepgeo-0.2.1-py3-none-any.whl (16.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page