User Tools

Site Tools


neuron_cloud

WARNING: The Cloud is retired

The site is just kept for historical reasons

Neuron Cloud API / Enrichment Services

tower01.picalike.corpex-kunden.de:7042/predict

url: http://tower01.picalike.corpex-kunden.de:7042/predict
url: http://dev01.picalike.corpex-kunden.de:7042/predict
oder LB: http://neuron-cloud.lb.int.picalike.corpex-kunden.de/predict
host: tower01.picalike.corpex-kunden.de
port: 7042
service name: /predict
method: POST
Test-Service: http://pci01.picalike.corpex-kunden.de:12345 (im zookeeper, wird hin und wieder umgezogen)
parameters should be passed as json (requests json parameter)

Host

Right now (March 2020) the setup is as follows:

  • Broker/Load Balancer
  • One instance on Sandy. All masters and workers have the IP published in their config files. No mone then one possible (unless you implement it, mach doch)
  • Masters
  • Tower01
  • Dev01 - simple HTTP services that forward a workload to the LB and return the result. They ask the Image Cloud to download the url and send parameters and image (bytes) to LB.
  • Workers
  • tower01: everything with a gpu will work. Docker images are massiv. Take image batch and run neural network.

git

How to put a new model in live system

Change in “neuron_cloud_3.py” (master), in /predict endpoint → Add a the new model name in the beginning, in the “for in chuncks” and in pred_crops.

For the workers: (All h5 are already in the workers) Copy the directory from some existing model and rename with the new model name. Put the h5, labels and mybe some new files (custom loss usw..) in all workers and in the new copied file.

Now, we need to change the router.py, in line 60 with, the new get semi_net-name And in the line 159 a new if

deployment

Masters, Workers and Broker will start as Docker images, deployment works as allways (config.sh, build.sh, push.sh, deploy.sh)

parameters

  • json = a dict with the following fields:

fiels in json:

  • Image, as link or base64:
  • url_list | myfile = a list of img urls | image file as base64 string
  • Similarity-Network, one of:
  • semi_net_inception_2 | semi_net_inception_3 | semi_net_inception_sk | semi_net_inception_4 | semi_net_inception_5 | semi_net_inception_6 | semi_net_inception_7 | semi_net_inception_8 = True
  • Object-Detection-Network, one of:
  • yolo | fasterrcnn | fasterrcnn_microworker | fasterrcnn_all_classes | fasterrcnn_sigmoid | fasterrcnn_sigmoid_2 = True
  • One or both of the network interfaces should be used

optional fiels in json:

  • If set, and both network interfaces are configured, boxes will be send to similarity net
  • predict_crops = *anything*
  • If set, the fullsize image will be downloaded from the image_cloud, even if no object detection is requested. otherwise, a 250×250 thumbnail is used.
  • download_image_fullsize = *anything*
  • If set, all categories and attributes will be returned
  • force_all_tags = *anything*
  • Percent value to enlarge the boxes
  • crop_margin_width = float
  • crop_margin_height = float
  • Flags to supress boxes by IOU, if a box is supressed, the field 'supressed_by_iou' is set.
  • max_iou = True
  • Score above which boxes are shown, boxes under this score are not returned
  • min_score = float (0-1)

out

:!: Detailed description of the detection-net*_boxes missing! (relative coordinates? absolute?, (x1, x2) = top left? (x1, y1) = top left?

{
  "images_without_error":{
    *url1*:{
      "attributes": [...],
      "categories": [...],
      "*detection-net*_boxes": [
         {
          'x1': ...,
          'x2': ...,
          'y1': ...,
          'y2': ...,
          'class': ...,
          'score': ...,
          ~optional~'supressed_by_iou': True,~
          ~optional~'crop_predictions':{
            "attributes": [...],
             categories": [...],
          }
         },
         ...
      ],
      "features": [...] #not if bignet is used
    },
    *url2*:{...}
  },
  "images_with_fatal_error":{...},
  "urls_with_image_cloud_error":{...}
}
neuron_cloud.txt · Last modified: 2024/04/11 14:23 by 127.0.0.1