title: Can't register a custom model (based on OpenCV) on Azure Machine Learning service
body: <p>I'm trying to register a model based on cv2.face.createFacemarkLBF with no success.</p>
  
  <p>I'm starting from such a class:</p>
  
  <pre><code>import cv2
  import numpy as np
  from pprint import pprint as pp
  from lib.fsclib import logger
  
  LBF_MODEL = model_file = "lbfmodel.yml"
  
  class Landmarker:
      def __init__(self):
          self.logger = logger
          self.landmarker = None
  
      def get_img_gray(self,img):
          return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
  
      def process_landmarks(self, raw_landmarks):
          return raw_landmarks
  
      def get_landmarks(self, img_gray, face_coords):
          pass
  
  class MyLandmarker(Landmarker):
      def __init__(self, model=LBF_MODEL):
          super(MyLandmarker).__init__()
          logger.info("Initializing FACEMARK with model: %s"%model)
          self.landmarker = cv2.face.createFacemarkLBF()
          self.landmarker.loadModel(model)
  
      def get_landmarks(self,image, face):
          landmarks = None
          try:
              ok, landmarks = self.landmarker.fit(self.get_img_gray(image), face)
          except Exception as e:
              logger.error("Error on class - %s - landmarking failed - %s"%(self.__class__.__name__,str(e)))
          return landmarks
  </code></pre>
  
  <p>...and I want to deploy it according to what explained in:</p>
  
  <p><a href="https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-deploy-and-where#registermodel" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-deploy-and-where#registermodel</a></p>
  
  <p>How can I deploy such OpenCV-based face landmarking model in ML Studio?</p>
  
  <p>Thanks,
  c</p>