From 738d511002b7a8850bf48438f8ffe596856b084a Mon Sep 17 00:00:00 2001 From: Dogukan Erenel Date: Thu, 25 Aug 2016 15:02:57 -0500 Subject: [PATCH 01/43] * Added camera target with path --- Prefabs/TouchManager.prefab | 5 +- Scripts/Camera/CameraTarget.cs | 149 ++++++++++++++++++++++++++++++++- 2 files changed, 152 insertions(+), 2 deletions(-) diff --git a/Prefabs/TouchManager.prefab b/Prefabs/TouchManager.prefab index 28d241758..e4619dcf9 100644 --- a/Prefabs/TouchManager.prefab +++ b/Prefabs/TouchManager.prefab @@ -68,6 +68,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 456440} m_RootOrder: 0 @@ -80,6 +81,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: - {fileID: 438902} - {fileID: 22440388} @@ -350,7 +352,7 @@ MonoBehaviour: sendMessageEvents: 60 sendMessageTarget: {fileID: 0} layers: - - {fileID: 11437114} + - {fileID: 0} --- !u!114 &11495534 MonoBehaviour: m_ObjectHideFlags: 1 @@ -402,6 +404,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children: [] m_Father: {fileID: 456440} m_RootOrder: 1 diff --git a/Scripts/Camera/CameraTarget.cs b/Scripts/Camera/CameraTarget.cs index 7d7f655f8..8b41cecfc 100644 --- a/Scripts/Camera/CameraTarget.cs +++ b/Scripts/Camera/CameraTarget.cs @@ -18,6 +18,7 @@ using UnityEngine; using IBM.Watson.DeveloperCloud.Logging; +using System.Collections.Generic; namespace IBM.Watson.DeveloperCloud.Camera { @@ -44,6 +45,15 @@ public class CameraTarget : MonoBehaviour private bool m_UseTargetObjectToRotate = false; [SerializeField] private GameObject m_CustomTargetObjectToLookAt = null; + [SerializeField] + private GameObject m_CameraPathRootObject = null; + [SerializeField] + private float m_RatioAtCameraPath = 0.0f; + [SerializeField] + private Vector3 m_DistanceFromCamera = Vector3.zero; + [SerializeField] + private SplineInterpolator m_SplineInterpolator; + private Transform[] m_PathTransforms; [SerializeField] private bool m_TextEnableCamera = false; @@ -88,6 +98,74 @@ public bool UseCustomRotation } } + /// + /// Gets or sets the ratio at camera path. It is used if there is path root object assigned to the system + /// + /// The ratio at camera path. + public float RatioAtCameraPath + { + get + { + return m_RatioAtCameraPath; + } + set + { + m_RatioAtCameraPath = Mathf.Repeat(value, 1.0f); + } + } + + /// + /// Gets or sets the camera path root object. + /// + /// The camera path root object. + public GameObject CameraPathRootObject + { + get + { + return m_CameraPathRootObject; + } + set + { + m_CameraPathRootObject = value; + } + } + + public Vector3 OffsetPosition + { + get + { + return m_OffsetPosition; + } + set + { + m_OffsetPosition = value; + } + } + + public Vector3 DistanceFromCamera + { + get + { + return m_DistanceFromCamera; + } + set + { + m_DistanceFromCamera = value; + } + } + + public Quaternion OffsetPositionRotation + { + get + { + return m_OffsetPositionRotation; + } + set + { + m_OffsetPositionRotation = value; + } + } + /// /// Gets or sets the target position. /// @@ -96,8 +174,41 @@ public Vector3 TargetPosition { get { + if (m_CameraPathRootObject != null) + { + if (m_PathTransforms == null) + { + List childrenTransforms = new List(m_CameraPathRootObject.GetComponentsInChildren()); + + childrenTransforms.Remove(m_CameraPathRootObject.transform); + childrenTransforms.Sort(delegate(Transform t1, Transform t2) + { + return t1.name.CompareTo(t2.name); + }); + + m_PathTransforms = childrenTransforms.ToArray(); + + if (m_SplineInterpolator == null) + { + m_SplineInterpolator = this.gameObject.GetComponent(); + if (m_SplineInterpolator == null) + m_SplineInterpolator = this.gameObject.AddComponent(); + } + + m_SplineInterpolator.SetupSplineInterpolator(m_PathTransforms); + } + + if (m_OffsetPosition != Vector3.zero) + { + return m_SplineInterpolator.GetHermiteAtTime(m_RatioAtCameraPath) + (TargetRotation * m_OffsetPosition); + } + else + { + return m_SplineInterpolator.GetHermiteAtTime(m_RatioAtCameraPath); + } - if (m_UseCustomPosition) + } + else if (m_UseCustomPosition) { return m_CustomPosition; } @@ -298,6 +409,42 @@ public void SetTargetPositionWithOffset(Vector3 offsetPosition) } #endregion + + void OnDrawGizmos() + { + if (m_CameraPathRootObject != null) + { + List childrenTransforms = new List(m_CameraPathRootObject.GetComponentsInChildren()); + + childrenTransforms.Remove(m_CameraPathRootObject.transform); + childrenTransforms.Sort(delegate(Transform t1, Transform t2) + { + return t1.name.CompareTo(t2.name); + }); + + m_PathTransforms = childrenTransforms.ToArray(); + + if (m_SplineInterpolator == null) + { + m_SplineInterpolator = this.gameObject.GetComponent(); + if (m_SplineInterpolator == null) + m_SplineInterpolator = this.gameObject.AddComponent(); + } + + m_SplineInterpolator.SetupSplineInterpolator(m_PathTransforms); + + Vector3 prevPos = m_PathTransforms[0].position; + for (int c = 1; c <= 100; c++) + { + float currTime = c * 1.0f / 100; + Vector3 currPos = m_SplineInterpolator.GetHermiteAtTime(currTime); + float mag = (currPos - prevPos).magnitude * 2; + Gizmos.color = new Color(mag, 0, 0, 1); + Gizmos.DrawLine(prevPos, currPos); + prevPos = currPos; + } + } + } } } From 69dd2d1197f4faa9930da77cf05f139cdb13375c Mon Sep 17 00:00:00 2001 From: Dogukan Erenel Date: Fri, 26 Aug 2016 18:51:40 -0500 Subject: [PATCH 02/43] * Added distance to make it more flexible with path --- Scripts/Camera/CameraTarget.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Camera/CameraTarget.cs b/Scripts/Camera/CameraTarget.cs index 8b41cecfc..70ba62c4c 100644 --- a/Scripts/Camera/CameraTarget.cs +++ b/Scripts/Camera/CameraTarget.cs @@ -200,11 +200,11 @@ public Vector3 TargetPosition if (m_OffsetPosition != Vector3.zero) { - return m_SplineInterpolator.GetHermiteAtTime(m_RatioAtCameraPath) + (TargetRotation * m_OffsetPosition); + return m_SplineInterpolator.GetHermiteAtTime(m_RatioAtCameraPath) + (TargetRotation * m_OffsetPosition) + DistanceFromCamera; } else { - return m_SplineInterpolator.GetHermiteAtTime(m_RatioAtCameraPath); + return m_SplineInterpolator.GetHermiteAtTime(m_RatioAtCameraPath) + DistanceFromCamera; } } From 388e88c7946e8c8c52a82c4b9a299bd382ac3fbe Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Sat, 27 Aug 2016 13:04:32 -0700 Subject: [PATCH 03/43] Update README.md Changed link to latest release in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ed5c23f13..5b8d79635 100644 --- a/README.md +++ b/README.md @@ -2094,7 +2094,7 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md). [wdc]: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/ [wdc_unity_sdk]: https://github.com/watson-developer-cloud/unity-sdk -[latest_release]: https://github.com/watson-developer-cloud/unity-sdk/archive/0.3.0.zip +[latest_release]: https://github.com/watson-developer-cloud/unity-sdk/releases/latest [bluemix_registration]: http://bluemix.net/registration [get_unity]: https://unity3d.com/get-unity From d11ab90c8ceeca08cd9f2936b053c933f51aa8ce Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Sat, 27 Aug 2016 13:18:53 -0700 Subject: [PATCH 04/43] change classify score from string to double --- Scripts/Services/VisualRecognition/DataModels.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Services/VisualRecognition/DataModels.cs b/Scripts/Services/VisualRecognition/DataModels.cs index 131b7c1f8..68319db46 100755 --- a/Scripts/Services/VisualRecognition/DataModels.cs +++ b/Scripts/Services/VisualRecognition/DataModels.cs @@ -101,7 +101,7 @@ public class ClassResult /// /// The score. /// - public string score { get; set; } + public double score { get; set; } /// /// The type hierarchy. /// From 47dc78c529c8f6635058727c1db77f120ee9c1f6 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Sat, 27 Aug 2016 15:53:00 -0700 Subject: [PATCH 05/43] classify arguments were reversed --- .../Scripts/ExampleVisualRecognition.cs | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs index adf3f5394..c43876f96 100755 --- a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs +++ b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs @@ -69,12 +69,12 @@ void Start() // Log.Debug("ExampleVisualRecognition", "Classify image failed!"); //// Classify post image - //Log.Debug("ExampleVisualRecognition", "Attempting to classify via image on file system"); - //string imagesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; - //string[] owners = { "IBM", "me" }; - //string[] classifierIDs = { "default" }; - //if (!m_VisualRecognition.Classify(OnClassify, imagesPath, owners, classifierIDs, 0.5f)) - // Log.Debug("ExampleVisualRecognition", "Classify image failed!"); + Log.Debug("ExampleVisualRecognition", "Attempting to classify via image on file system"); + string imagesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; + string[] owners = { "IBM", "me" }; + string[] classifierIDs = { "default" }; + if (!m_VisualRecognition.Classify(imagesPath, OnClassify,owners, classifierIDs, 0.5f)) + Log.Debug("ExampleVisualRecognition", "Classify image failed!"); //// Detect faces get //Log.Debug("ExampleVisualRecognition", "Attempting to detect faces via URL"); @@ -170,11 +170,14 @@ private void OnClassify(ClassifyTopLevelMultiple classify, string data) foreach (ClassifyTopLevelSingle image in classify.images) { Log.Debug("ExampleVisualRecognition", "\tsource_url: " + image.source_url + ", resolved_url: " + image.resolved_url); - foreach (ClassifyPerClassifier classifier in image.classifiers) + if (image.classifiers != null && image.classifiers.Length > 0) { - Log.Debug("ExampleVisualRecognition", "\t\tclassifier_id: " + classifier.classifier_id + ", name: " + classifier.name); - foreach (ClassResult classResult in classifier.classes) - Log.Debug("ExampleVisualRecognition", "\t\t\tclass: " + classResult.m_class + ", score: " + classResult.score + ", type_hierarchy: " + classResult.type_hierarchy); + foreach (ClassifyPerClassifier classifier in image.classifiers) + { + Log.Debug("ExampleVisualRecognition", "\t\tclassifier_id: " + classifier.classifier_id + ", name: " + classifier.name); + foreach (ClassResult classResult in classifier.classes) + Log.Debug("ExampleVisualRecognition", "\t\t\tclass: " + classResult.m_class + ", score: " + classResult.score + ", type_hierarchy: " + classResult.type_hierarchy); + } } } } From 1d21c168414020b869ff84a7949992c0e60c6a3b Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Sat, 27 Aug 2016 16:01:45 -0700 Subject: [PATCH 06/43] remove dialog from ConfigEditor --- Scripts/Editor/ConfigEditor.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Scripts/Editor/ConfigEditor.cs b/Scripts/Editor/ConfigEditor.cs index 783930dfb..3cf935136 100755 --- a/Scripts/Editor/ConfigEditor.cs +++ b/Scripts/Editor/ConfigEditor.cs @@ -52,8 +52,6 @@ private class ServiceSetup URL ="https://console.ng.bluemix.net/catalog/speech-to-text/", ServiceID="SpeechToTextV1" }, new ServiceSetup() { ServiceName = "Text To Speech", ServiceAPI = "text-to-speech/api", URL ="https://console.ng.bluemix.net/catalog/text-to-speech/", ServiceID="TextToSpeechV1" }, - new ServiceSetup() { ServiceName = "Dialog", ServiceAPI = "dialog/api", - URL ="https://console.ng.bluemix.net/catalog/dialog/", ServiceID="DialogV1" }, new ServiceSetup() { ServiceName = "Language Translation (to be deprecated)", ServiceAPI = "language-translation/api", URL ="https://console.ng.bluemix.net/catalog/services/language-translation/", ServiceID="LanguageTranslationV1" }, //new ServiceSetup() { ServiceName = "Language Translator", ServiceAPI = "language-translator/api", From eda72a719688526c82afc7a4d494c652cff1926e Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Sat, 27 Aug 2016 16:04:18 -0700 Subject: [PATCH 07/43] removed dialog from service examples --- .../ServiceExamples/ServiceExamples.unity | 47 ++----------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/Examples/ServiceExamples/ServiceExamples.unity b/Examples/ServiceExamples/ServiceExamples.unity index b4adc4f80..ac74c0a89 100755 --- a/Examples/ServiceExamples/ServiceExamples.unity +++ b/Examples/ServiceExamples/ServiceExamples.unity @@ -37,7 +37,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.3735644, g: 0.38112032, b: 0.35887682, a: 1} + m_IndirectSpecularColor: {r: 0.3735645, g: 0.38112062, b: 0.35887584, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -593,7 +593,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &1713392458 MonoBehaviour: m_ObjectHideFlags: 0 @@ -633,7 +633,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1740459832 MonoBehaviour: m_ObjectHideFlags: 0 @@ -658,47 +658,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 ---- !u!1 &1979050314 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1979050316} - - 114: {fileID: 1979050315} - m_Layer: 0 - m_Name: ExampleDialog - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!114 &1979050315 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1979050314} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e8b52562568714a48a89536c62fb978e, type: 3} - m_Name: - m_EditorClassIdentifier: - m_DialogID: 61343031353936302d333963322d346436622d393537312d333863373461656366666664 ---- !u!4 &1979050316 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1979050314} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 --- !u!1 &2004886371 GameObject: m_ObjectHideFlags: 0 From aeacc4cb39f77aeb8ee5acbe8756bd44973703f0 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Sat, 27 Aug 2016 16:21:12 -0700 Subject: [PATCH 08/43] fixed examples for visual recognition --- .../Scripts/ExampleVisualRecognition.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs index c43876f96..9e42f6941 100755 --- a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs +++ b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs @@ -25,9 +25,9 @@ public class ExampleVisualRecognition : MonoBehaviour { private VisualRecognition m_VisualRecognition = new VisualRecognition(); - private string m_classifierName = "Apples_OptionalParams"; - private string m_classifierID = "ApplesClassifierNameWithSpaces_73100404"; - private string m_classifierToDelete = "unitytestclassifier2b_37849361"; + private string m_classifierName = "unity-test-classifier-example"; + private string m_classifierID = "unitytestclassifierexample_487365485"; + private string m_classifierToDelete = "unitytestclassifierexample_263072401"; private string m_imageURL = "https://upload.wikimedia.org/wikipedia/commons/e/e9/Official_portrait_of_Barack_Obama.jpg"; private string m_imageTextURL = "http://i.stack.imgur.com/ZS6nH.png"; @@ -65,37 +65,37 @@ void Start() //// Classify get //Log.Debug("ExampleVisualRecognition", "Attempting to get classify via URL"); - //if (!m_VisualRecognition.Classify(m_imageURL, OnClassify)) + //if (!m_VisualRecognition.Classify(OnClassify, m_imageURL)) // Log.Debug("ExampleVisualRecognition", "Classify image failed!"); //// Classify post image - Log.Debug("ExampleVisualRecognition", "Attempting to classify via image on file system"); - string imagesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; - string[] owners = { "IBM", "me" }; - string[] classifierIDs = { "default" }; - if (!m_VisualRecognition.Classify(imagesPath, OnClassify,owners, classifierIDs, 0.5f)) - Log.Debug("ExampleVisualRecognition", "Classify image failed!"); + //Log.Debug("ExampleVisualRecognition", "Attempting to classify via image on file system"); + //string imagesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; + //string[] owners = { "IBM", "me" }; + //string[] classifierIDs = { "default" }; + //if (!m_VisualRecognition.Classify(imagesPath, OnClassify, owners, classifierIDs, 0.5f)) + // Log.Debug("ExampleVisualRecognition", "Classify image failed!"); //// Detect faces get //Log.Debug("ExampleVisualRecognition", "Attempting to detect faces via URL"); - //if (!m_VisualRecognition.DetectFaces(m_imageURL, OnDetectFaces)) + //if (!m_VisualRecognition.DetectFaces(OnDetectFaces, m_imageURL)) // Log.Debug("ExampleVisualRecogntiion", "Detect faces failed!"); //// Detect faces post image //Log.Debug("ExampleVisualRecognition", "Attempting to detect faces via image"); //string faceExamplePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; - //if (!m_VisualRecognition.DetectFaces(OnDetectFaces, faceExamplePath)) + //if (!m_VisualRecognition.DetectFaces(faceExamplePath, OnDetectFaces)) // Log.Debug("ExampleVisualRecognition", "Detect faces failed!"); //// Recognize text get //Log.Debug("ExampleVisualRecognition", "Attempting to recognizeText via URL"); - //if (!m_VisualRecognition.RecognizeText(m_imageTextURL, OnRecognizeText)) + //if (!m_VisualRecognition.RecognizeText(OnRecognizeText, m_imageTextURL)) // Log.Debug("ExampleVisualRecognition", "Recognize text failed!"); //// Recognize text post image //Log.Debug("ExampleVisualRecognition", "Attempting to recognizeText via image"); //string textExamplePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/from_platos_apology.png"; - //if (!m_VisualRecognition.RecognizeText(OnRecognizeText, textExamplePath)) + //if (!m_VisualRecognition.RecognizeText(textExamplePath, OnRecognizeText)) // Log.Debug("ExampleVisualRecognition", "Recognize text failed!"); } From 5db3118d0ce18a40a3eb2e0ff3e321d02c5e6697 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Sat, 27 Aug 2016 18:57:54 -0700 Subject: [PATCH 09/43] bug where classifier is not being passed into call --- .../Scripts/ExampleVisualRecognition.cs | 12 ++++++------ .../Services/VisualRecognition/VisualRecognition.cs | 9 ++++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs index 9e42f6941..66665bece 100755 --- a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs +++ b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs @@ -69,12 +69,12 @@ void Start() // Log.Debug("ExampleVisualRecognition", "Classify image failed!"); //// Classify post image - //Log.Debug("ExampleVisualRecognition", "Attempting to classify via image on file system"); - //string imagesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; - //string[] owners = { "IBM", "me" }; - //string[] classifierIDs = { "default" }; - //if (!m_VisualRecognition.Classify(imagesPath, OnClassify, owners, classifierIDs, 0.5f)) - // Log.Debug("ExampleVisualRecognition", "Classify image failed!"); + Log.Debug("ExampleVisualRecognition", "Attempting to classify via image on file system"); + string imagesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_to_classify.jpg"; + string[] owners = { "IBM", "me" }; + string[] classifierIDs = { "default", m_classifierID }; + if (!m_VisualRecognition.Classify(imagesPath, OnClassify, owners, classifierIDs, 0.5f)) + Log.Debug("ExampleVisualRecognition", "Classify image failed!"); //// Detect faces get //Log.Debug("ExampleVisualRecognition", "Attempting to detect faces via URL"); diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index e7349ada7..f35a24a1d 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -224,7 +224,14 @@ public class VisualRecognition : IWatsonService req.Headers["Content-Type"] = "application/x-www-form-urlencoded"; req.Headers["Accept-Language"] = acceptLanguage; - if(imageData != null) + if (owners != default(string[])) + req.Parameters["owners"] = string.Join(",", owners); + if (classifierIDs != default(string[])) + req.Parameters["classifier_ids"] = string.Join(",", classifierIDs); + if (threshold != default(float)) + req.Parameters["threshold"] = threshold; + + if (imageData != null) req.Send = imageData; return connector.Send(req); From b4420bfc70c28c235e097da917eb02d2a7bc34b3 Mon Sep 17 00:00:00 2001 From: Dogukan Erenel Date: Mon, 29 Aug 2016 17:51:02 -0500 Subject: [PATCH 10/43] * Minor fix touch-event-manager --- Scripts/Utilities/TouchEventManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Utilities/TouchEventManager.cs b/Scripts/Utilities/TouchEventManager.cs index 8f8cbdacf..067372138 100644 --- a/Scripts/Utilities/TouchEventManager.cs +++ b/Scripts/Utilities/TouchEventManager.cs @@ -383,7 +383,7 @@ public UnityEngine.Camera MainCamera { get { - if (m_mainCamera == null) + if (m_mainCamera == null || !m_mainCamera.transform.CompareTag("MainCamera")) m_mainCamera = UnityEngine.Camera.main; return m_mainCamera; From 9a0d878b72fe808a5df6e7b17d2921e184a30762 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 31 Aug 2016 17:00:34 -0500 Subject: [PATCH 11/43] disabled warnings on tests and examples. Removed some unused variables. --- Examples/ServiceExamples/Scripts/ExampleAlchemyLanguage.cs | 4 +++- Examples/ServiceExamples/Scripts/ExampleRetrieveAndRank.cs | 1 + Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs | 1 + Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs | 2 ++ Scripts/Services/PersonalityInsights/PersonalityInsights.cs | 3 +-- Scripts/UnitTests/TestAlchemyLanguage.cs | 3 +++ Scripts/UnitTests/TestConversationExperimental.cs | 2 ++ Scripts/UnitTests/TestLanguageTranslator.cs | 2 +- Scripts/UnitTests/TestRetrieveAndRank.cs | 3 +++ Scripts/UnitTests/TestTextToSpeech.cs | 1 + Scripts/UnitTests/TestVisualRecognition.cs | 2 ++ Scripts/Widgets/WebCamDisplayWidget.cs | 2 ++ Scripts/Widgets/WebCamWidget.cs | 2 +- 13 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Examples/ServiceExamples/Scripts/ExampleAlchemyLanguage.cs b/Examples/ServiceExamples/Scripts/ExampleAlchemyLanguage.cs index b71c5e707..e87375f9a 100755 --- a/Examples/ServiceExamples/Scripts/ExampleAlchemyLanguage.cs +++ b/Examples/ServiceExamples/Scripts/ExampleAlchemyLanguage.cs @@ -20,6 +20,8 @@ using IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1; using IBM.Watson.DeveloperCloud.Logging; +#pragma warning disable 0219 +#pragma warning disable 0414 public class ExampleAlchemyLanguage : MonoBehaviour { private AlchemyAPI m_AlchemyAPI = new AlchemyAPI(); @@ -52,7 +54,7 @@ void Start() // Log.Debug("ExampleAlchemyLanguage", "Failed to get concepts HTML POST!"); ////Get Concepts URL POST - //if (!m_AlchemyAPI.GetRankedConcepts(OnGetConcepts, m_ExampleURL_watsonJeopardy)) + //if (!m_AlchemyAPI.GetRankedConcepts(OnGetCzoncepts, m_ExampleURL_watsonJeopardy)) // Log.Debug("ExampleAlchemyLanguage", "Failed to get concepts HTML POST!"); ////Get Date URL POST diff --git a/Examples/ServiceExamples/Scripts/ExampleRetrieveAndRank.cs b/Examples/ServiceExamples/Scripts/ExampleRetrieveAndRank.cs index cffaf71a8..4f3111225 100755 --- a/Examples/ServiceExamples/Scripts/ExampleRetrieveAndRank.cs +++ b/Examples/ServiceExamples/Scripts/ExampleRetrieveAndRank.cs @@ -25,6 +25,7 @@ using UnityEditor; #endif +#pragma warning disable 219 public class ExampleRetrieveAndRank : MonoBehaviour { private RetrieveAndRank m_RetrieveAndRank = new RetrieveAndRank(); diff --git a/Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs b/Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs index cdbd27dff..0222d75ae 100755 --- a/Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs +++ b/Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs @@ -18,6 +18,7 @@ using UnityEngine; using IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1; using IBM.Watson.DeveloperCloud.Logging; +#pragma warning disable 0414 public class ExampleTextToSpeech : MonoBehaviour { diff --git a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs index 66665bece..545952467 100755 --- a/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs +++ b/Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs @@ -22,6 +22,8 @@ using IBM.Watson.DeveloperCloud.Logging; using IBM.Watson.DeveloperCloud.Utilities; +#pragma warning disable 0414 + public class ExampleVisualRecognition : MonoBehaviour { private VisualRecognition m_VisualRecognition = new VisualRecognition(); diff --git a/Scripts/Services/PersonalityInsights/PersonalityInsights.cs b/Scripts/Services/PersonalityInsights/PersonalityInsights.cs index 08359265e..2ee6c8370 100755 --- a/Scripts/Services/PersonalityInsights/PersonalityInsights.cs +++ b/Scripts/Services/PersonalityInsights/PersonalityInsights.cs @@ -88,8 +88,7 @@ public bool GetProfile(OnGetProfile callback, string source, req.Headers["Content-Language"] = contentLanguage; req.Headers["Accept"] = accept; req.Headers["Accept-Language"] = acceptLanguage; - - string normalizedSource = source.Trim().ToLower(); + if (source.StartsWith(Application.dataPath)) { string jsonData = default(string); diff --git a/Scripts/UnitTests/TestAlchemyLanguage.cs b/Scripts/UnitTests/TestAlchemyLanguage.cs index b9470e0bd..93c351eeb 100755 --- a/Scripts/UnitTests/TestAlchemyLanguage.cs +++ b/Scripts/UnitTests/TestAlchemyLanguage.cs @@ -22,6 +22,9 @@ using UnityEngine; using System.Collections.Generic; +#pragma warning disable 219 +#pragma warning disable 0414 + namespace IBM.Watson.DeveloperCloud.UnitTests { public class TestAlchemyAPI : UnitTest diff --git a/Scripts/UnitTests/TestConversationExperimental.cs b/Scripts/UnitTests/TestConversationExperimental.cs index de3cfa5da..770081fca 100755 --- a/Scripts/UnitTests/TestConversationExperimental.cs +++ b/Scripts/UnitTests/TestConversationExperimental.cs @@ -22,6 +22,8 @@ using IBM.Watson.DeveloperCloud.Utilities; using IBM.Watson.DeveloperCloud.Logging; +#pragma warning disable 0169 +#pragma warning disable 0414 public class TestConversationExperimental// : UnitTest // Commented out integration test { private ConversationExperimental m_Conversation = new ConversationExperimental(); diff --git a/Scripts/UnitTests/TestLanguageTranslator.cs b/Scripts/UnitTests/TestLanguageTranslator.cs index 7b5ac4a14..573144644 100755 --- a/Scripts/UnitTests/TestLanguageTranslator.cs +++ b/Scripts/UnitTests/TestLanguageTranslator.cs @@ -20,7 +20,7 @@ using IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v1; using IBM.Watson.DeveloperCloud.Utilities; using System.Collections; - +#pragma warning disable 0414 namespace IBM.Watson.DeveloperCloud.UnitTests { public class TestLanguageTranslator// : UnitTest // commented out UnitTest unitl LanguageTranslator goes live diff --git a/Scripts/UnitTests/TestRetrieveAndRank.cs b/Scripts/UnitTests/TestRetrieveAndRank.cs index 55cd88287..103ac5827 100755 --- a/Scripts/UnitTests/TestRetrieveAndRank.cs +++ b/Scripts/UnitTests/TestRetrieveAndRank.cs @@ -25,6 +25,9 @@ using IBM.Watson.DeveloperCloud.Utilities; using System.Collections.Generic; +#pragma warning disable 0649 +#pragma warning disable 0414 + namespace IBM.Watson.DeveloperCloud.UnitTests { public class TestRetrieveAndRank : UnitTest diff --git a/Scripts/UnitTests/TestTextToSpeech.cs b/Scripts/UnitTests/TestTextToSpeech.cs index fc0d6e8ee..1b9052197 100755 --- a/Scripts/UnitTests/TestTextToSpeech.cs +++ b/Scripts/UnitTests/TestTextToSpeech.cs @@ -21,6 +21,7 @@ using IBM.Watson.DeveloperCloud.Logging; using IBM.Watson.DeveloperCloud.Utilities; +#pragma warning disable 0414 namespace IBM.Watson.DeveloperCloud.UnitTests { public class TestTextToSpeech : UnitTest diff --git a/Scripts/UnitTests/TestVisualRecognition.cs b/Scripts/UnitTests/TestVisualRecognition.cs index 113f9bc0f..650bc5de9 100755 --- a/Scripts/UnitTests/TestVisualRecognition.cs +++ b/Scripts/UnitTests/TestVisualRecognition.cs @@ -24,6 +24,8 @@ using System; using IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3; +#pragma warning disable 0414 + namespace IBM.Watson.DeveloperCloud.UnitTests { public class TestVisualRecognition : UnitTest diff --git a/Scripts/Widgets/WebCamDisplayWidget.cs b/Scripts/Widgets/WebCamDisplayWidget.cs index 23670e7db..1fb22e777 100755 --- a/Scripts/Widgets/WebCamDisplayWidget.cs +++ b/Scripts/Widgets/WebCamDisplayWidget.cs @@ -21,6 +21,8 @@ using UnityEngine.UI; using IBM.Watson.DeveloperCloud.Logging; +#pragma warning disable 0414 + namespace IBM.Watson.DeveloperCloud.Widgets { /// diff --git a/Scripts/Widgets/WebCamWidget.cs b/Scripts/Widgets/WebCamWidget.cs index ad6188b8a..caa5f2e34 100755 --- a/Scripts/Widgets/WebCamWidget.cs +++ b/Scripts/Widgets/WebCamWidget.cs @@ -22,7 +22,7 @@ using IBM.Watson.DeveloperCloud.Logging; using IBM.Watson.DeveloperCloud.Utilities; using UnityEngine.UI; - +#pragma warning disable 0414 namespace IBM.Watson.DeveloperCloud.Widgets { /// From b1ba562e3f6f83140c408494bc098077fe631857 Mon Sep 17 00:00:00 2001 From: Dogukan Erenel Date: Wed, 31 Aug 2016 20:14:09 -0500 Subject: [PATCH 12/43] * Fix unregistration from taps - TouchManager * Added Epoch Milliseconds / Seconds and added conversion from millisecond / second to epoch time. --- Scripts/Utilities/TouchEventManager.cs | 66 +++++++++++++++++++++----- Scripts/Utilities/Utility.cs | 23 ++++++++- 2 files changed, 75 insertions(+), 14 deletions(-) diff --git a/Scripts/Utilities/TouchEventManager.cs b/Scripts/Utilities/TouchEventManager.cs index 067372138..c9d89958c 100644 --- a/Scripts/Utilities/TouchEventManager.cs +++ b/Scripts/Utilities/TouchEventManager.cs @@ -275,6 +275,15 @@ public override int GetHashCode() return base.GetHashCode(); } + /// + /// Returns a that represents the current . + /// + /// A that represents the current . + public override string ToString() + { + return string.Format("[TouchEventData: GameObjectAttached={0}, Collider={1}, Collider2D={2}, RectTransform={3}, ColliderList={4}, ColliderList2D={5}, RectTransformList={6}, IsInside={7}, TapCallback={8}, DragCallback={9}, SortingLayer={10}, CanDragObject={11}]", GameObjectAttached, Collider, Collider2D, RectTransform, ColliderList, ColliderList2D, RectTransformList, IsInside, TapCallback, DragCallback, SortingLayer, CanDragObject); + } + } #region Private Data @@ -1154,7 +1163,9 @@ private void TwoFingerTransformedHandler(object sender, System.EventArgs e) } else { - Log.Warning("TouchEventManager", "There is no 3D collider of given gameobjectToTouch"); + #if ENABLE_DEBUGGING + Log.Debug("TouchEventManager", "There is no 3D collider of given gameobjectToTouch"); + #endif } if (!success) @@ -1182,7 +1193,9 @@ private void TwoFingerTransformedHandler(object sender, System.EventArgs e) success = true; } else { - Log.Warning ("TouchEventManager", "There is no 2D collider of given gameobjectToTouch"); + #if ENABLE_DEBUGGING + Log.Debug ("TouchEventManager", "There is no 2D collider of given gameobjectToTouch"); + #endif } } #if UNITY_4_6 || UNITY_5 || UNITY_5_3_OR_NEWER @@ -1211,7 +1224,9 @@ private void TwoFingerTransformedHandler(object sender, System.EventArgs e) success = true; } else { - Log.Warning ("TouchEventManager", "There is no Rect Transform of given gameobjectToTouch"); + #if ENABLE_DEBUGGING + Log.Debug ("TouchEventManager", "There is no Rect Transform of given gameobjectToTouch"); + #endif } } #endif @@ -1258,15 +1273,19 @@ private void TwoFingerTransformedHandler(object sender, System.EventArgs e) foreach (Collider itemCollider in colliderList) { int numberOfRemovedCallbacks = m_TapEvents[layerMaskAsKey].RemoveAll( - e => - e.Collider == itemCollider && - e.TapCallback == callback && - e.SortingLayer == SortingLayer && - e.IsInside == isTapInside); + e => + e.Collider == itemCollider && + e.TapCallback == callback && + e.SortingLayer == SortingLayer && + e.IsInside == isTapInside); success &= (numberOfRemovedCallbacks > 0); } } + else + { + success = false; + } if (!success) { @@ -1286,7 +1305,13 @@ private void TwoFingerTransformedHandler(object sender, System.EventArgs e) success &= (numberOfRemovedCallbacks > 0); } } + else + { + success = false; + } } + + #if UNITY_4_6 || UNITY_5 || UNITY_5_3_OR_NEWER if (!success) { @@ -1306,6 +1331,10 @@ private void TwoFingerTransformedHandler(object sender, System.EventArgs e) success &= (numberOfRemovedCallbacks > 0); } } + else + { + success = false; + } } #endif } @@ -1392,16 +1421,16 @@ private void TapGesture_Tapped(object sender, System.EventArgs e) { TouchEventData tapEventData = kp.Value[i]; - if (kp.Value[i].Collider == null && kp.Value[i].Collider2D == null && kp.Value[i].RectTransform == null ) + if (kp.Value[i].Collider == null && kp.Value[i].Collider2D == null && kp.Value[i].RectTransform == null && kp.Value[i].RectTransformList == null ) { - Log.Warning("TouchEventManager", "Removing invalid collider event receiver from TapEventList"); + Log.Warning("TouchEventManager", "Removing invalid collider event receiver from TapEventList from {0}", kp.Value[i].ToString()); kp.Value.RemoveAt(i--); continue; } if (string.IsNullOrEmpty(tapEventData.TapCallback)) { - Log.Warning("TouchEventManager", "Removing invalid event receiver from TapEventList"); + Log.Warning("TouchEventManager", "Removing invalid event receiver from TapEventList {0}", kp.Value[i]); kp.Value.RemoveAt(i--); continue; } @@ -1801,6 +1830,10 @@ private void TapGesture_Tapped(object sender, System.EventArgs e) success &= (numberOfRemovedCallbacks > 0); } } + else + { + success = false; + } if (!success) { @@ -1820,6 +1853,11 @@ private void TapGesture_Tapped(object sender, System.EventArgs e) success &= (numberOfRemovedCallbacks > 0); } } + else + { + success = false; + } + } #if UNITY_4_6 || UNITY_5 || UNITY_5_3_OR_NEWER if (!success) @@ -1840,6 +1878,10 @@ private void TapGesture_Tapped(object sender, System.EventArgs e) success &= (numberOfRemovedCallbacks > 0); } } + else + { + success = false; + } } #endif } @@ -1927,7 +1969,7 @@ private void DoubleTapGesture_Tapped(object sender, System.EventArgs e) { TouchEventData tapEventData = kp.Value[i]; - if (kp.Value[i].Collider == null && kp.Value[i].Collider2D == null && kp.Value[i].RectTransform == null ) + if (kp.Value[i].Collider == null && kp.Value[i].Collider2D == null && kp.Value[i].RectTransform == null && kp.Value[i].RectTransformList == null) { Log.Warning("TouchEventManager", "Removing invalid collider event receiver from DoubleTapEventList"); kp.Value.RemoveAt(i--); diff --git a/Scripts/Utilities/Utility.cs b/Scripts/Utilities/Utility.cs index 6cf89c50d..4775cccd0 100644 --- a/Scripts/Utilities/Utility.cs +++ b/Scripts/Utilities/Utility.cs @@ -278,12 +278,22 @@ public static string StripString(string s) /// Gets the EPOCH time in UTC time zome /// /// Double EPOCH in UTC - public static double GetEpochUTC() + public static double GetEpochUTCMilliseconds() { DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); return (DateTime.UtcNow - epoch).TotalMilliseconds; } + /// + /// Gets the epoch UTC seconds. + /// + /// The epoch UTC seconds. + public static double GetEpochUTCSeconds() + { + DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + return (DateTime.UtcNow - epoch).TotalSeconds; + } + /// /// Gets the date time from epoch. /// @@ -293,7 +303,16 @@ public static double GetEpochUTC() public static DateTime GetLocalDateTimeFromEpoch(double epochTime) { DateTime dateTime = new DateTime(1970,1,1,0,0,0,0,System.DateTimeKind.Utc); - dateTime = dateTime.AddMilliseconds(epochTime).ToLocalTime(); + try + { + dateTime = dateTime.AddSeconds(epochTime).ToLocalTime(); + } + catch (ArgumentOutOfRangeException ex) + { + Log.Debug("Utility", "Time conversion assuming time is in Milliseconds: {0}, {1}", epochTime, ex.Message); + dateTime = dateTime.AddMilliseconds(epochTime).ToLocalTime(); + } + return dateTime; } From 885894a2302096974b3be1713bfa936d7d3aba9d Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 31 Aug 2016 20:25:10 -0500 Subject: [PATCH 13/43] encrypt config --- Config.json.enc | Bin 5184 -> 5248 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Config.json.enc b/Config.json.enc index 7a85c1700cb39d6eb5fa703eae9713476ec1eb4f..35ff60fe0b9e421a35509362b6dbb18b4a2a42bd 100644 GIT binary patch literal 5248 zcmV-`6o2czF<|N?kJNzwG$hD74^#Z~6V9t0u4+)P3@&%+a<#()n`I|$q-!Uhn&t{; zPUQeJDX8w2sPpAy=uijtc2S4P=?W`FgT2lv81cf>!ARnPi?g*)z1nckkg}nT2MJA1 z$pyn<4+m8!5{J z#!Ks-^0e`;v|8aN*O)d9+MsS}U2}&n-)*-xU6FXauknwp-HV5!+`UFCD0wES5_begiW5Hx3KG`^|> zTEkqyY#qMB+Y9H?#GY8YA z5p$a=wC^Di;;lm-DSl?Q75{k}Cp@laNo}K}9FtNmkMkLeQB(-x3%(X#wdT>)8coRL z-uDbbpXwuK`Rgef}_F&BV%221P!G z5P}#FTEwFN~4u zsRM_cUKuqtwRe+s0FwE(KpMztPVr9 z{s;Qw3$sSBPF$kC%$j1n1Ne3xpv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A4B9oh4&yGugCv5aAU?PMN&>RvD z`yHq|m~1CB3C#P(6!Jm)rttM0aFGo|YH?`s>rb%dnVZdSU9IhB7TPsVE;+V1W#-MU ueqgx$pitwfz}Y}v&G#2l0VM{hlVJ!hHvu>HC6FNVJ~jYr28voS4QxY)S^Z7` From 3cd9afa97f9b0e9b5ba8cb0250e5b4e999daf0e5 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 31 Aug 2016 20:34:31 -0500 Subject: [PATCH 14/43] encrypt config --- Config.json.enc | Bin 5248 -> 5248 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Config.json.enc b/Config.json.enc index 35ff60fe0b9e421a35509362b6dbb18b4a2a42bd..4d2573640edaed8c1c0dc1c65e3589adc0080d7d 100644 GIT binary patch literal 5248 zcmV-`6o2b6c=(HMUCaHC*G<01JO?EYh3Q-L&m&XZc<>X zewB9ZORdj+AxeIRd)~`>B_k#OPFD8D3R0{nGP*-MU-@iym+&zy4kaESS~@g$aiZb&5Gih?+oEEOd(U^ zt+TB#t-fsf;S6-6VOlOfSehFopF#WkR`G?Xo-%NV=A}wKdxs2CLCegvYH~K0i875| zAODx&UONtgQ{{?Vg$i+2A}B?FE@h_Iao)2ZOElDjXuGn{OP>a}biHAUpmT#rIurS~ zuOaE}JmjlO@u+i4xQ3?Gln(|pWmpIIQ75h` zOra5aY4?JaOHaLZ1$mY)?3we;v$|UF4-yufR{f8bk0r_Ok}p|9bLt>=(uQ@S3&fq= zolw)I*_lxJb-Z%z)xXFUsn*n$*Y&o{{djV_5Bj@V*~JXTa*y25f7gQR#%CO`D zU@>K>xlJ_0g$JS?{lvdG?+)uunOmVKK}F4+4*9C12X-^gvz~m7n~mbpbd~y!|9XzKY_oD}Vr`Opa!b_Tj4TZPnNt&27+uFnK)jY1yLi}U zsgbCHhUR6?t2s5d9BYmADZejmFqbCc7mVm{KvR{@M!?VL;BE*B;bY$B;bVbV;f-9h zx>)S}a7gb>NK8f4DVwjpjc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1u$^kLRSJ9-IFq3T?sHadV Gn67QXxk*0& From b07eb60099a588679d14435992f59fa08361a909 Mon Sep 17 00:00:00 2001 From: Dogukan Erenel Date: Wed, 31 Aug 2016 20:54:43 -0500 Subject: [PATCH 15/43] * hot fix added for spline interpolator --- Scripts/Camera/CameraTarget.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Scripts/Camera/CameraTarget.cs b/Scripts/Camera/CameraTarget.cs index 70ba62c4c..3f4674101 100644 --- a/Scripts/Camera/CameraTarget.cs +++ b/Scripts/Camera/CameraTarget.cs @@ -15,6 +15,7 @@ * */ +//#define SPLINE_INTERPOLATOR using UnityEngine; using IBM.Watson.DeveloperCloud.Logging; @@ -51,8 +52,10 @@ public class CameraTarget : MonoBehaviour private float m_RatioAtCameraPath = 0.0f; [SerializeField] private Vector3 m_DistanceFromCamera = Vector3.zero; + #if SPLINE_INTERPOLATOR [SerializeField] private SplineInterpolator m_SplineInterpolator; + #endif private Transform[] m_PathTransforms; [SerializeField] @@ -174,6 +177,7 @@ public Vector3 TargetPosition { get { + #if SPLINE_INTERPOLATOR if (m_CameraPathRootObject != null) { if (m_PathTransforms == null) @@ -208,7 +212,9 @@ public Vector3 TargetPosition } } - else if (m_UseCustomPosition) + else + #endif + if (m_UseCustomPosition) { return m_CustomPosition; } @@ -410,6 +416,8 @@ public void SetTargetPositionWithOffset(Vector3 offsetPosition) #endregion + #if SPLINE_INTERPOLATOR + void OnDrawGizmos() { if (m_CameraPathRootObject != null) @@ -445,6 +453,8 @@ void OnDrawGizmos() } } } + + #endif } } From ea3695ad458f7aa53cc04433f4e83a0629437efd Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 31 Aug 2016 20:58:50 -0500 Subject: [PATCH 16/43] encrypt config --- Config.json.enc | Bin 5248 -> 5248 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Config.json.enc b/Config.json.enc index 35ff60fe0b9e421a35509362b6dbb18b4a2a42bd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on Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 31 Aug 2016 21:34:31 -0500 Subject: [PATCH 17/43] replaced old vr credentials --- Config.json.enc | Bin 5248 -> 5248 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Config.json.enc b/Config.json.enc index 6c80ade91428c09750cc18429dacff5d3c078dc3..ca6e68deab8fdf4d84c67ec258307cd00a578775 100644 GIT binary patch literal 5248 zcmV-`6o2bf2D8>)dUynL>NJui2OWT~uYFkd_3m$teJCnnmZ*C6ZMg}oQvhSN7DQ5Y za9Y6LI$0!go+il1Cr22l8)rh9`;RXoVr*2SU(_jgj4zj)2Y4E2R&;bCm)>@{S%PqS z-x%|b8eAYhpKOn#OY+sRHkLf5Uc``bFKF-yyUMQworFm#c7ql`^IA0Q8e-Z++h!pN z44B>9_pKFol)&Jde+j*vXHEG+>OgxxTRg8}$EM=zD&ptHqz~Ai(}PaG9tY~7u~8aW zaKoFoEbd$ld7UD39pw4vJ9F;L=l$iRsC%%b0E`p(=wn{ZJhHSr*IDYtq@A$IoD+{- z^;;@e;bo83*9>X%`io8bKenEM@8d<9SjDnIFeoWb`KeWwj!Q$- zV`EMi3@CLu4auZEZdO+Nr{ULo`Hf$}i^(D#|0PKUinr@A>OKaZgTd8A6gF7r5}Xv+-w;_&vCi6$|PRqzrw`b|md; z4E+ZfW4MBVC8=|%jrY&lz6FgX7MbYXL4Wzp*|j`1xKYdFloT$k$Z}^#1^dBR#G4;L zKD`yyk~V3wxDQO-Ut?8zwN+f}G7@QIk(R@!+X?XzqQ6s+j>b^4{J zo!NrydsVCfskW6^4go6K;G*wT&8%0bHEuDY*glxsOT>I9^_eORWE)>KSIs#~ zMV^kwL*OPEri;M&DmtdhnEOJaJV~j?-SewWI|I?I3Os%B@!GG#yWcA3X}&g=Zx_)% zfNq1P)@nWkXOdrzJt=6WjYXE&R_{P|X@}mj{pRMGI7*P7E}$N#lF_AxJf?P+{~E@- zz9*|ua1)6ph%zmz!{C9Cql647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K=oesRfOlCbp&(&;DrcY%%+=M!^>ub41?3z&8mTvl;7{k%}ui4+nk^ z{P4FjS>0rQwlQ%iw@5kNUc=D8t0GMApvHl_7{Ns^jGd~#amyHM+tdS8@W4!#r3^S9 zMQEr3&IjFduA&}-ZCoMI-)04UUCM&7V5|DiPVWw5!+EPrLC6p-|kc7>c9#3B*(CchhEu;PeFiE&^T8fsV77RmYCt#z*F zYcgWUObUfAA-7n#xiA|?tKVS;S#x|H`y)(+>NaB0O?G(&74~6;-+e^$Ak1ttN?d)8 zNx#n~NQ9~n%xXmdkJ##|WYC{)kw@7f)HBif1rnO%q>eYx)zRmDHS~ znR{&Yhg@w@DW-LzhZiAZph4uXJ`KwWr{^!X^Yhnl*5qNM1ZXBCH#ZdHIh!{ob;NRs z>K9otGB}nXuPw|0Ur2Q>CCvd09`1m>;rCjj`=64qcD46Jvb2$u!4`+rmw*-T;9=me znhZns1$_H3{Rwk3uRrD8edG*V10Kw1<2tt2MyT5JDT6ps-6wB3z;}3*zvuSOfXCMf z0@V657JZ#`IP#_yxPFt2LkX*NzOcoh-H|3zeiwpN6*ZFnelkPFD@#9b`keuj&)5=qvTqZ%WuGvAa{WV?&dkQF G!XWtVXebQ; From 78cf630fbdb3c7c9b23dbe7d14be061bc03b999a Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 1 Sep 2016 13:46:19 -0500 Subject: [PATCH 18/43] disable warnings from 3rd party plugins --- Scripts/Connection/WSConnector.cs | 2 ++ .../TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs | 2 ++ ThirdParty/WebSocketSharp/Net/CookieException.cs | 2 ++ ThirdParty/WebSocketSharp/Net/WebHeaderCollection.cs | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Scripts/Connection/WSConnector.cs b/Scripts/Connection/WSConnector.cs index 2c7464b7d..65d90f2f3 100644 --- a/Scripts/Connection/WSConnector.cs +++ b/Scripts/Connection/WSConnector.cs @@ -25,6 +25,8 @@ using System.Threading; using WebSocketSharp; +#pragma warning disable 0618 + namespace IBM.Watson.DeveloperCloud.Connection { /// diff --git a/ThirdParty/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs b/ThirdParty/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs index 733f28f7e..311af9b6a 100644 --- a/ThirdParty/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs +++ b/ThirdParty/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs @@ -5,6 +5,8 @@ using System.Text.RegularExpressions; using UnityEngine; +#pragma warning disable 0618 + namespace TouchScript.Devices.Display { /// diff --git a/ThirdParty/WebSocketSharp/Net/CookieException.cs b/ThirdParty/WebSocketSharp/Net/CookieException.cs index 06123aec8..dd39cefde 100755 --- a/ThirdParty/WebSocketSharp/Net/CookieException.cs +++ b/ThirdParty/WebSocketSharp/Net/CookieException.cs @@ -40,6 +40,8 @@ using System.Runtime.Serialization; using System.Security.Permissions; +#pragma warning disable 0618 + namespace WebSocketSharp.Net { /// diff --git a/ThirdParty/WebSocketSharp/Net/WebHeaderCollection.cs b/ThirdParty/WebSocketSharp/Net/WebHeaderCollection.cs index 8423d2f17..e41db20c2 100755 --- a/ThirdParty/WebSocketSharp/Net/WebHeaderCollection.cs +++ b/ThirdParty/WebSocketSharp/Net/WebHeaderCollection.cs @@ -49,6 +49,8 @@ using System.Security.Permissions; using System.Text; +#pragma warning disable 0618 + namespace WebSocketSharp.Net { /// From ab5d5b5fd9559487f88181abc3f12fab6c73a1af Mon Sep 17 00:00:00 2001 From: Richard Lyle Date: Thu, 1 Sep 2016 18:07:23 -0500 Subject: [PATCH 19/43] HOTFIX: Increased fragment to max size for now. --- ThirdParty/WebSocketSharp/WebSocket.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThirdParty/WebSocketSharp/WebSocket.cs b/ThirdParty/WebSocketSharp/WebSocket.cs index a58e6d678..89beff4f4 100755 --- a/ThirdParty/WebSocketSharp/WebSocket.cs +++ b/ThirdParty/WebSocketSharp/WebSocket.cs @@ -148,7 +148,7 @@ public class WebSocket : IDisposable static WebSocket () { EmptyBytes = new byte[0]; - FragmentLength = 1016; + FragmentLength = Int32.MaxValue - 14; // 1016 RandomNumber = new RNGCryptoServiceProvider (); } From b94c98ed5801d2d054585b40e0dbc1cdaa7ed344 Mon Sep 17 00:00:00 2001 From: Dogukan Erenel Date: Mon, 5 Sep 2016 16:42:55 -0500 Subject: [PATCH 20/43] * Fix by adding public members of tap and dragging events --- Scripts/Widgets/TouchWidget.cs | 40 ++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/Scripts/Widgets/TouchWidget.cs b/Scripts/Widgets/TouchWidget.cs index 74d906253..233d985e7 100644 --- a/Scripts/Widgets/TouchWidget.cs +++ b/Scripts/Widgets/TouchWidget.cs @@ -40,7 +40,7 @@ protected override string GetName() #region Private Data [Serializable] - private class TapEventMapping + public class TapEventMapping { public GameObject m_TapObject = null; public bool m_TapOnObject = true; @@ -50,7 +50,7 @@ private class TapEventMapping }; [Serializable] - private class FullScreenDragEventMapping + public class FullScreenDragEventMapping { [Tooltip("If there is no drag layer object set, it uses FullScreen")] public GameObject m_DragLayerObject = null; @@ -67,6 +67,42 @@ private class FullScreenDragEventMapping private List m_FullScreenDragMappings = new List(); #endregion + #region Public Members + + /// + /// Gets or sets the tap mappings. + /// + /// The tap mappings. + public List TapMappings + { + get + { + return m_TapMappings; + } + set + { + m_TapMappings = value; + } + } + + /// + /// Gets or sets the full screen drag mappings. + /// + /// The full screen drag mappings. + public List FullScreenDragMappings + { + get + { + return m_FullScreenDragMappings; + } + set + { + m_FullScreenDragMappings = value; + } + } + + #endregion + #region Event Handlers private void OnEnable() { From 16fa1cb00476dd1dcfe53ba0c6c4c82e937b9427 Mon Sep 17 00:00:00 2001 From: Richard Lyle Date: Sat, 10 Sep 2016 21:50:53 -0500 Subject: [PATCH 21/43] HOTFIX: TTS keeps saying the word "quote" at the end of all speech, I don't think it's required to put quotes around the parameters anymore. --- Scripts/Services/TextToSpeech/TextToSpeech.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Services/TextToSpeech/TextToSpeech.cs b/Scripts/Services/TextToSpeech/TextToSpeech.cs index 1f87727f6..ba6a51380 100755 --- a/Scripts/Services/TextToSpeech/TextToSpeech.cs +++ b/Scripts/Services/TextToSpeech/TextToSpeech.cs @@ -303,14 +303,14 @@ public bool ToSpeech(string text, ToSpeechCallback callback, bool usePost = fals if (usePost) { Dictionary upload = new Dictionary(); - upload["text"] = "\"" + text + "\""; + upload["text"] = text; req.Send = Encoding.UTF8.GetBytes(Json.Serialize(upload)); req.Headers["Content-Type"] = "application/json"; } else { - req.Parameters["text"] = "\"" + text + "\""; + req.Parameters["text"] = text; } return connector.Send(req); From ca7eed21296535560c571d5cd2654cea91fbc924 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 13:29:53 -0500 Subject: [PATCH 22/43] added similarity search endpoints to visualrecognition service --- Scripts/Services/VisualRecognition/VisualRecognition.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index f35a24a1d..8a6396346 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -95,6 +95,12 @@ public class VisualRecognition : IWatsonService private const string SERVICE_DETECT_FACES = "/v3/detect_faces"; private const string SERVICE_RECOGNIZE_TEXT = "/v3/recognize_text"; private const string SERVICE_CLASSIFIERS = "/v3/classifiers"; + private const string SERVICE_COLLECTIONS = "/v3/collections"; + private const string SERVICE_COLLECTION = "/v3/collections/{0}"; + private const string SERVICE_COLLECTION_IMAGES = "/v3/collections/{0}/images"; + private const string SERVICE_COLLECTION_IMAGE = "/v3/collections/{0}/images/{1}"; + private const string SERVICE_COLLECTION_IMAGE_METADATA = "/v3/collections/{0}/images/{1}/metadata"; + private const string SERVICE_COLLECTION_FIND_SIMILAR = "/v3/collections/{0}/find_similar"; private static string mp_ApiKey = null; private static fsSerializer sm_Serializer = new fsSerializer(); private const float REQUEST_TIMEOUT = 10.0f * 60.0f; From cab4df00d3f618478662eee425058cafe50b168e Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 13:58:42 -0500 Subject: [PATCH 23/43] Similarity search data models --- .../Services/VisualRecognition/DataModels.cs | 640 +++++++++++------- 1 file changed, 403 insertions(+), 237 deletions(-) diff --git a/Scripts/Services/VisualRecognition/DataModels.cs b/Scripts/Services/VisualRecognition/DataModels.cs index 68319db46..563a8d63d 100755 --- a/Scripts/Services/VisualRecognition/DataModels.cs +++ b/Scripts/Services/VisualRecognition/DataModels.cs @@ -19,403 +19,569 @@ namespace IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3 { #region Classify - /// - /// Holds multiple classifications. - /// + /// + /// Holds multiple classifications. + /// [fsObject] public class ClassifyTopLevelMultiple { - /// - /// The number of images processed. - /// + /// + /// The number of images processed. + /// public int images_processed { get; set; } - /// - /// Array of classified images. - /// + /// + /// Array of classified images. + /// public ClassifyTopLevelSingle[] images { get; set; } - /// - /// Array of warnings. - /// + /// + /// Array of warnings. + /// public WarningInfo[] warnings { get; set; } } - /// - /// One classification. - /// + /// + /// One classification. + /// [fsObject] public class ClassifyTopLevelSingle { - /// - /// The source URL. - /// + /// + /// The source URL. + /// public string source_url { get; set; } - /// - /// The resolved URL. - /// + /// + /// The resolved URL. + /// public string resolved_url { get; set; } - /// - /// The Image. - /// + /// + /// The Image. + /// public string image { get; set; } - /// - /// The error. - /// + /// + /// The error. + /// public ErrorInfoNoCode error { get; set; } - /// - /// The classification results. - /// + /// + /// The classification results. + /// public ClassifyPerClassifier[] classifiers { get; set; } } - /// - /// One classifier. - /// + /// + /// One classifier. + /// [fsObject] public class ClassifyPerClassifier { - /// - /// The name. - /// + /// + /// The name. + /// public string name { get; set; } - /// - /// The classifier identifier. - /// + /// + /// The classifier identifier. + /// public string classifier_id { get; set; } - /// - /// Array of classification results. - /// + /// + /// Array of classification results. + /// public ClassResult[] classes { get; set; } } - /// - /// One class result. - /// + /// + /// One class result. + /// [fsObject] public class ClassResult { - /// - /// The class result. - /// + /// + /// The class result. + /// [fsProperty("class")] public string m_class { get; set; } - /// - /// The score. - /// + /// + /// The score. + /// public double score { get; set; } - /// - /// The type hierarchy. - /// + /// + /// The type hierarchy. + /// public string type_hierarchy { get; set; } } - /// - /// The classify parameters. - /// + /// + /// The classify parameters. + /// [fsObject] public class ClassifyParameters { - /// - /// The URL. - /// + /// + /// The URL. + /// public string url { get; set; } - /// - /// The clasifier identifiers. - /// + /// + /// The clasifier identifiers. + /// public string[] classifier_ids { get; set; } - /// - /// The owners. - /// + /// + /// The owners. + /// public string[] owners { get; set; } - /// - /// The classification threshold. - /// + /// + /// The classification threshold. + /// public float threshold { get; set; } } #endregion #region Detect Faces - /// - /// Multiple faces. - /// + /// + /// Multiple faces. + /// [fsObject] public class FacesTopLevelMultiple { - /// - /// Number of images processed. - /// + /// + /// Number of images processed. + /// public int images_processed { get; set; } - /// - /// Array of face classifications. - /// + /// + /// Array of face classifications. + /// public FacesTopLevelSingle[] images { get; set; } - /// - /// Warning info. - /// + /// + /// Warning info. + /// public WarningInfo[] warnings { get; set; } } - /// - /// One face classification. - /// + /// + /// One face classification. + /// [fsObject] public class FacesTopLevelSingle { - /// - /// The source URL. - /// + /// + /// The source URL. + /// public string source_url { get; set; } - /// - /// The resolved URL. - /// + /// + /// The resolved URL. + /// public string resolved_url { get; set; } - /// - /// The image. - /// + /// + /// The image. + /// public string image { get; set; } - /// - /// The error. - /// + /// + /// The error. + /// public ErrorInfoNoCode error { get; set; } - /// - /// The face results. - /// + /// + /// The face results. + /// public OneFaceResult[] faces { get; set; } } - /// - /// One face result. - /// + /// + /// One face result. + /// [fsObject] public class OneFaceResult { - /// - /// The face age. - /// + /// + /// The face age. + /// public Age age { get; set; } - /// - /// The face gender. - /// + /// + /// The face gender. + /// public Gender gender { get; set; } - /// - /// The face location in pixels. - /// + /// + /// The face location in pixels. + /// public FaceLocation face_location { get; set; } - /// - /// The face identity. - /// + /// + /// The face identity. + /// public Identity identity { get; set; } } - /// - /// Detect faces parameters. - /// + /// + /// Detect faces parameters. + /// [fsObject] public class DetectFacesParameters { - /// - /// The face URL. - /// + /// + /// The face URL. + /// public string url { get; set; } } #endregion #region Recognize Text - /// - /// Mulitple text pages. - /// + /// + /// Mulitple text pages. + /// [fsObject] public class TextRecogTopLevelMultiple { - /// - /// Number of images processed. - /// + /// + /// Number of images processed. + /// public int images_processed { get; set; } - /// - /// Array of text image classifications. - /// + /// + /// Array of text image classifications. + /// public TextRecogTopLevelSingle[] images { get; set; } - /// - /// The warnings. - /// + /// + /// The warnings. + /// public WarningInfo[] warnings { get; set; } } - /// - /// One text page. - /// + /// + /// One text page. + /// [fsObject] public class TextRecogTopLevelSingle { - /// - /// The source URL. - /// + /// + /// The source URL. + /// public string source_url { get; set; } - /// - /// The resolved URL. - /// + /// + /// The resolved URL. + /// public string resolved_url { get; set; } - /// - /// The image. - /// + /// + /// The image. + /// public string image { get; set; } - /// - /// The error. - /// + /// + /// The error. + /// public ErrorInfoNoCode error { get; set; } - /// - /// The text. - /// + /// + /// The text. + /// public string text { get; set; } - /// - /// The words. - /// + /// + /// The words. + /// public TextRecogOneWord[] words { get; set; } } - /// - /// One word. - /// + /// + /// One word. + /// [fsObject] public class TextRecogOneWord { - /// - /// The word. - /// + /// + /// The word. + /// public string word { get; set; } - /// - /// The word location in pixels. - /// + /// + /// The word location in pixels. + /// public Location location { get; set; } - /// - /// The classification score. - /// + /// + /// The classification score. + /// public double score { get; set; } - /// - /// The line number. - /// + /// + /// The line number. + /// public double line_number { get; set; } } - /// - /// Word location. - /// + /// + /// Word location. + /// [fsObject] public class Location { - /// - /// The location width. - /// + /// + /// The location width. + /// public double width { get; set; } - /// - /// The location height. - /// + /// + /// The location height. + /// public double height { get; set; } - /// - /// The location left. - /// + /// + /// The location left. + /// public double left { get; set; } - /// - /// The loction top. - /// + /// + /// The loction top. + /// public double top { get; set; } } - /// - /// Recognize text parameters. - /// + /// + /// Recognize text parameters. + /// [fsObject] public class RecognizeTextParameters { - /// - /// The URL. - /// + /// + /// The URL. + /// public string url { get; set; } } #endregion #region Classifiers - /// - /// Classifiers breif. - /// + /// + /// Classifiers breif. + /// [fsObject] public class GetClassifiersTopLevelBrief { - /// - /// Array of classifiers. - /// + /// + /// Array of classifiers. + /// public GetClassifiersPerClassifierBrief[] classifiers { get; set; } } - /// - /// Classifier breif. - /// + /// + /// Classifier breif. + /// [fsObject] public class GetClassifiersPerClassifierBrief { - /// - /// The classifier identifier. - /// + /// + /// The classifier identifier. + /// public string classifier_id { get; set; } - /// - /// The classifier name. - /// + /// + /// The classifier name. + /// public string name { get; set; } } - /// - /// Classifier verbose. - /// + /// + /// Classifier verbose. + /// [fsObject] public class GetClassifiersPerClassifierVerbose { - /// - /// The classifier identifier. - /// + /// + /// The classifier identifier. + /// public string classifier_id { get; set; } - /// - /// The classifier name. - /// + /// + /// The classifier name. + /// public string name { get; set; } - /// - /// The classifier owner. - /// + /// + /// The classifier owner. + /// public string owner { get; set; } - /// - /// The classifier status. - /// + /// + /// The classifier status. + /// public string status { get; set; } - /// - /// The classifier explanation. - /// + /// + /// The classifier explanation. + /// public string explanation { get; set; } - /// - /// The classifier created. - /// + /// + /// The classifier created. + /// public string created { get; set; } - /// - /// Array of classes. - /// + /// + /// Array of classes. + /// public Class[] classes { get; set; } } - /// - /// The class. - /// + /// + /// The class. + /// [fsObject] public class Class { - /// - /// The class. - /// + /// + /// The class. + /// [fsProperty("class")] public string m_Class { get; set; } } #endregion + #region Similarity Search + /// + /// Collecitons response object. + /// + [fsObject] + public class GetCollections + { + /// + /// Array of collections. + /// + public CreateCollection[] collections; + } + + /// + /// A collection. + /// + [fsObject] + public class CreateCollection + { + /// + /// The ID of the new collection. + /// + public string collection_id { get; set; } + /// + /// The ID of the new collection. + /// + public string name { get; set; } + /// + /// The ID of the new collection. + /// + public string created { get; set; } + /// + /// The ID of the new collection. + /// + public int images { get; set; } + /// + /// The status of collection creation. Returns available when the collection is available to add images, and unavailable when the collection is being created or trained. + /// + public string status { get; set; } + /// + /// The number of images possible in the collection. Each collection can contain 1000000 images. + /// + public string capacity { get; set; } + } + + /// + /// Collections brief object. + /// + [fsObject] + public class GetCollectionImages + { + /// + /// Array of collections. + /// + public GetCollectionsBrief[] images { get; set; } + } + + /// + /// Collection brief object. + /// + [fsObject] + public class GetCollectionsBrief + { + /// + /// The unique ID of the image. Save this to add or remove it from the collection. + /// + public string image_id { get; set; } + /// + /// Date the image was added to the collection. + /// + public string created { get; set; } + /// + /// File name of the image. + /// + public string image_file { get; set; } + /// + /// Metadat JSON object (key value pairs). + /// + public object metadata { get; set; } + } + + /// + /// The collections config + /// + [fsObject] + public class CollectionsConfig + { + /// + /// Array of collection images config. + /// + public CollectionImagesConfig[] images { get; set; } + /// + /// The number of images processed in this call. + /// + public int images_processed { get; set; } + } + + /// + /// The collection config. + /// + [fsObject] + public class CollectionImagesConfig + { + /// + /// The unique ID of the image. Save this to add or remove it from the collection. + /// + public string image_id { get; set; } + /// + /// Date the image was added to the collection. + /// + public string created { get; set; } + /// + /// File name of the image. + /// + public string image_file { get; set; } + /// + /// Metadat JSON object (key value pairs). + /// + public object metadata { get; set; } + } + + /// + /// Similar images result. + /// + [fsObject] + public class SimilarImagesConfig + { + /// + /// The similar images. + /// + public SimilarImageConfig[] similar_images { get; set; } + /// + /// The number of images processed in this call. + /// + public int images_processed { get; set; } + } + + /// + /// Similar image result. + /// + [fsObject] + public class SimilarImageConfig + { + /// + /// The unique ID of the image. Save this to add or remove it from the collection. + /// + public string image_id { get; set; } + /// + /// Date the image was added to the collection. + /// + public string created { get; set; } + /// + /// File name of the image. + /// + public string image_file { get; set; } + /// + /// Metadat JSON object (key value pairs). + /// + public object metadata { get; set; } + /// + /// Confidence in the match. + /// + public float score { get; set; } + } + #endregion + #region Common - /// - /// Warning info. - /// + /// + /// Warning info. + /// [fsObject] public class WarningInfo { From 1f8368f0f42e50e777247daf5abb57c9f81baa70 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 14:16:49 -0500 Subject: [PATCH 24/43] comment out endpoints to hit in VisualRecognition --- .../VisualRecognition/VisualRecognition.cs | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 8a6396346..cfed164c5 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1093,6 +1093,50 @@ private void OnDeleteClassifierResp(RESTConnector.Request req, RESTConnector.Res } #endregion + #region Get Collections + //Get all collections. + #endregion + + #region Create collection + //Create a new collection of images to search. You can create a maximum of 5 collections. + #endregion + + #region Delete Collection + //Deletes a collection. + #endregion + + #region Get Collection + //Retrieve information about a specific collection. Only user-created collections can be specified. + #endregion + + #region Get Collection Images + //List 100 images in a collection + #endregion + + #region Add Collection Images + //Add images to a collection + #endregion + + #region Delete Image + //Delete an image + #endregion + + #region Get Image + //List image details + #endregion + + #region Delete Image Metadata + //Delete image metadata + #endregion + + #region List Image Metadata + //List image metadata. + #endregion + + #region Find Similar Images + //Find Similar Images + #endregion + #region private methods private string GetMimeType(string imagePath) { From 48a719d5b4b782afb0c87f6e243f84709ec0bc5d Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 14:59:31 -0500 Subject: [PATCH 25/43] added callback delegates for each similarity search endpoint --- .../VisualRecognition/VisualRecognition.cs | 89 +++++++++++++++++-- 1 file changed, 84 insertions(+), 5 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index cfed164c5..b6462fb3f 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -41,42 +41,117 @@ public class VisualRecognition : IWatsonService /// Callback used by FindClassifier(). /// /// The classifer found by name. + /// Optional data public delegate void OnFindClassifier(GetClassifiersPerClassifierVerbose classifier, string data); /// /// The callback used by the GetClassifiers() method. /// - /// + /// A brief description of classifiers. + /// Optional data public delegate void OnGetClassifiers(GetClassifiersTopLevelBrief classifiers, string data); /// /// Callback used by the GetClassifier() method. /// /// The classifier found by ID. + /// Optional data public delegate void OnGetClassifier(GetClassifiersPerClassifierVerbose classifier, string data); /// /// This callback is used by the DeleteClassifier() method. /// - /// + /// Success or failure of the delete call. + /// Optional data public delegate void OnDeleteClassifier(bool success, string data); /// /// Callback used by the TrainClassifier() method. /// /// The classifier created. + /// Optional data public delegate void OnTrainClassifier(GetClassifiersPerClassifierVerbose classifier, string data); /// /// This callback is used by the Classify() method. /// - /// + /// Returned classification. + /// Optional data public delegate void OnClassify(ClassifyTopLevelMultiple classify, string data); /// /// This callback is used by the DetectFaces() method. /// - /// + /// Faces Detected. + /// Optional data public delegate void OnDetectFaces(FacesTopLevelMultiple faces, string data); /// /// This callback is used by the RecognizeText() method. /// - /// + /// Text Recognized. + /// Optional data public delegate void OnRecognizeText(TextRecogTopLevelMultiple text, string data); + /// + /// This callback is used by the GetCollections() method. + /// + /// Collections. + /// Optional data + public delegate void OnGetCollections(GetCollections collections, string data); + /// + /// This callback is used by the CreateCollection() method. + /// + /// The created collection. + /// Optional data + public delegate void OnCreateCollection(CreateCollection collection, string data); + /// + /// This callback is used by the DeleteCollection() method. + /// + /// Success of the delete call. + /// Optional data + public delegate void OnDeleteCollection(bool success, string data); + /// + /// This callback is used y the GetCollection() method. + /// + /// The collection. + /// Optional data + public delegate void OnGetCollection(CreateCollection collection, string data); + /// + /// This callback is used by the GetCollectionImages() method. + /// + /// Collection images. + /// Optional data + public delegate void OnGetCollectionImages(GetCollectionImages images, string data); + /// + /// This callback is used by the AddCollectionImage() method. + /// + /// The collection config. + /// Optional data + public delegate void OnAddCollectionimages(CollectionsConfig config, string data); + /// + /// This callback is used by the DeleteCollectionImage() method. + /// + /// Success or failure of deleting collection image. + /// Optional data + public delegate void OnDeleteCollectionImage(bool success, string data); + /// + /// This callback is used by the GetImageDetails() method. + /// + /// The image details. + /// Optional data + public delegate void OnGetImageDetails(GetCollectionsBrief image, string data); + /// + /// This callback is used by the DeleteImageMetadata() method. + /// + /// Success of the delete call. + /// Optional data + public delegate void OnDeleteImageMetadata(bool success, string data); + /// + /// This callback is used by the GetImageMetadata() method. + /// + /// + /// Optional data + public delegate void OnGetImageMetadata(object metadata, string data); + /// + /// This callback is used by the FindSimilar() method. + /// + /// + /// Optional data + public delegate void OnFindSimilar(SimilarImagesConfig similarImages, string data); + /// /// The delegate for loading a file, used by TrainClassifier(). /// @@ -1095,6 +1170,10 @@ private void OnDeleteClassifierResp(RESTConnector.Request req, RESTConnector.Res #region Get Collections //Get all collections. + //public bool GetCollections() + //{ + + //} #endregion #region Create collection From d13cd602e45534b92760f12d0b8cd68b53dabdef Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 15:37:18 -0500 Subject: [PATCH 26/43] GetCollections --- .../VisualRecognition/VisualRecognition.cs | 73 ++++++++++++++++++- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index b6462fb3f..59a0b320d 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1169,15 +1169,80 @@ private void OnDeleteClassifierResp(RESTConnector.Request req, RESTConnector.Res #endregion #region Get Collections - //Get all collections. - //public bool GetCollections() - //{ + /// + /// Get all collections. + /// + /// The callback. + /// Custom data. + /// + public bool GetCollections(OnGetCollections callback, string customData = default(string)) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, SERVICE_COLLECTIONS); + if (connector == null) + return false; + + GetCollectionsReq req = new GetCollectionsReq(); + req.Callback = callback; + req.Data = customData; + + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnGetClassifiersResp; + + return connector.Send(req); + } + + private class GetCollectionsReq : RESTConnector.Request + { + /// + /// OnGetCollections callback. + /// + public OnGetCollections Callback { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnGetCollectionsRest(RESTConnector.Request req, RESTConnector.Response resp) + { + GetCollections collections = new GetCollections(); + if(resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); - //} + object obj = collections; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch(Exception e) + { + Log.Error("VisualRecognition", "GetCollections Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((GetCollectionsReq)req).Callback != null) + ((GetCollectionsReq)req).Callback(resp.Success ? collections : null, ((GetCollectionsReq)req).Data); + } #endregion #region Create collection //Create a new collection of images to search. You can create a maximum of 5 collections. + #endregion #region Delete Collection From 90c0c88da5761f40314f1099e7a395c6e92f8e00 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 15:54:41 -0500 Subject: [PATCH 27/43] CreateCollection --- .../VisualRecognition/VisualRecognition.cs | 84 ++++++++++++++++++- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 59a0b320d..4a1b12d2a 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1212,7 +1212,7 @@ private class GetCollectionsReq : RESTConnector.Request public string Data { get; set; } } - private void OnGetCollectionsRest(RESTConnector.Request req, RESTConnector.Response resp) + private void OnGetCollectionsResp(RESTConnector.Request req, RESTConnector.Response resp) { GetCollections collections = new GetCollections(); if(resp.Success) @@ -1241,8 +1241,86 @@ private void OnGetCollectionsRest(RESTConnector.Request req, RESTConnector.Respo #endregion #region Create collection - //Create a new collection of images to search. You can create a maximum of 5 collections. - + /// + /// Create a new collection of images to search. You can create a maximum of 5 collections. + /// + /// The callback. + /// The name of the created collection. + /// Optional custom data. + /// + public bool CreateCollection(OnCreateCollection callback, string name, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, SERVICE_COLLECTIONS); + if (connector == null) + return false; + + CreateCollectionReq req = new CreateCollectionReq(); + req.Callback = callback; + req.Name = name; + req.Data = customData; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Parameters["name"] = name; + req.Forms = new Dictionary(); + req.Forms["disregard"] = new RESTConnector.Form("empty"); + + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnGetClassifiersResp; + + return connector.Send(req); + } + + private class CreateCollectionReq : RESTConnector.Request + { + /// + /// OnCreateCollection callback. + /// + public OnCreateCollection Callback { get; set; } + /// + /// Name of the collection to create. + /// + public string Name { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnCreateCollectionResp(RESTConnector.Request req, RESTConnector.Response resp) + { + CreateCollection collection = new CreateCollection(); + if (resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); + + object obj = collection; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch (Exception e) + { + Log.Error("VisualRecognition", "OnCreateCollectionResp Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((CreateCollectionReq)req).Callback != null) + ((CreateCollectionReq)req).Callback(resp.Success ? collection : null, ((CreateCollectionReq)req).Data); + } #endregion #region Delete Collection From 5c787b9b28b4761b52c0f88adbde374abddd46b3 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 16:06:11 -0500 Subject: [PATCH 28/43] Delete collection --- .../VisualRecognition/VisualRecognition.cs | 67 +++++++++++++++++-- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 4a1b12d2a..867e48fa6 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1174,7 +1174,7 @@ private void OnDeleteClassifierResp(RESTConnector.Request req, RESTConnector.Res /// /// The callback. /// Custom data. - /// + /// Returns true if succeess, false if failure. public bool GetCollections(OnGetCollections callback, string customData = default(string)) { if (callback == null) @@ -1195,7 +1195,7 @@ private void OnDeleteClassifierResp(RESTConnector.Request req, RESTConnector.Res req.Parameters["api_key"] = mp_ApiKey; req.Parameters["version"] = VisualRecognitionVersion.Version; req.Timeout = 20.0f * 60.0f; - req.OnResponse = OnGetClassifiersResp; + req.OnResponse = OnGetCollectionsResp; return connector.Send(req); } @@ -1247,7 +1247,7 @@ private void OnGetCollectionsResp(RESTConnector.Request req, RESTConnector.Respo /// The callback. /// The name of the created collection. /// Optional custom data. - /// + /// Returns true if succeess, false if failure. public bool CreateCollection(OnCreateCollection callback, string name, string customData = null) { if (callback == null) @@ -1269,12 +1269,12 @@ public bool CreateCollection(OnCreateCollection callback, string name, string cu req.Data = customData; req.Parameters["api_key"] = mp_ApiKey; req.Parameters["version"] = VisualRecognitionVersion.Version; - req.Parameters["name"] = name; req.Forms = new Dictionary(); + req.Forms["name"] = new RESTConnector.Form(name); req.Forms["disregard"] = new RESTConnector.Form("empty"); req.Timeout = 20.0f * 60.0f; - req.OnResponse = OnGetClassifiersResp; + req.OnResponse = OnCreateCollectionResp; return connector.Send(req); } @@ -1324,7 +1324,62 @@ private void OnCreateCollectionResp(RESTConnector.Request req, RESTConnector.Res #endregion #region Delete Collection - //Deletes a collection. + /// + /// Deletes a collection. + /// + /// The OnDeleteCollection callback. + /// The collection identifier to delete. + /// Optional custom data. + /// Returns true if succeess, false if failure. + public bool DeleteCollection(OnDeleteCollection callback, string collectionID, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION, collectionID)); + if (connector == null) + return false; + + DeleteCollectionReq req = new DeleteCollectionReq(); + req.Callback = callback; + req.CollectionID = collectionID; + req.Data = customData; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnDeleteCollectionResp; + req.Delete = true; + return connector.Send(req); + } + + private class DeleteCollectionReq : RESTConnector.Request + { + /// + /// OnDeleteCollection callback. + /// + public OnDeleteCollection Callback { get; set; } + /// + /// Collection identifier of the collection to be deleted. + /// + public string CollectionID { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnDeleteCollectionResp(RESTConnector.Request req, RESTConnector.Response resp) + { + if (((DeleteCollectionReq)req).Callback != null) + ((DeleteCollectionReq)req).Callback(resp.Success, ((DeleteCollectionReq)req).Data); + } #endregion #region Get Collection From 81ba79bf164507b468f4e41f699039aff032941b Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Wed, 14 Sep 2016 16:26:57 -0500 Subject: [PATCH 29/43] Get Collection --- .../VisualRecognition/VisualRecognition.cs | 81 ++++++++++++++++++- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 867e48fa6..4304e7e0c 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1352,10 +1352,10 @@ public bool DeleteCollection(OnDeleteCollection callback, string collectionID, s req.Data = customData; req.Parameters["api_key"] = mp_ApiKey; req.Parameters["version"] = VisualRecognitionVersion.Version; - + req.Delete = true; req.Timeout = 20.0f * 60.0f; req.OnResponse = OnDeleteCollectionResp; - req.Delete = true; + return connector.Send(req); } @@ -1383,7 +1383,82 @@ private void OnDeleteCollectionResp(RESTConnector.Request req, RESTConnector.Res #endregion #region Get Collection - //Retrieve information about a specific collection. Only user-created collections can be specified. + /// + /// Retrieve information about a specific collection. Only user-created collections can be specified. + /// + /// The callback. + /// The requested collection identifier. + /// Custom data. + /// Returns true if succeess, false if failure. + public bool GetCollection(OnGetCollection callback, string collectionID, string customData = default(string)) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException(collectionID); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION, collectionID)); + if (connector == null) + return false; + + GetCollectionReq req = new GetCollectionReq(); + req.Callback = callback; + req.Data = customData; + req.CollectionID = collectionID; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnGetCollectionResp; + + return connector.Send(req); + } + + private class GetCollectionReq : RESTConnector.Request + { + /// + /// OnGetCollections callback. + /// + public OnGetCollection Callback { get; set; } + /// + /// Collection identifier of the requested collection. + /// + public string CollectionID { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnGetCollectionResp(RESTConnector.Request req, RESTConnector.Response resp) + { + CreateCollection collection = new CreateCollection(); + if(resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); + + object obj = collection; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch(Exception e) + { + Log.Error("VisualRecognition", "GetCollection Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((GetCollectionReq)req).Callback != null) + ((GetCollectionReq)req).Callback(resp.Success ? collection : null, ((GetCollectionReq)req).Data); + } #endregion #region Get Collection Images From 9f755cfa7034037082f24ba83ba735c6227c6138 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 10:10:31 -0500 Subject: [PATCH 30/43] GetCollectionImages and AddCollectionImages --- .../VisualRecognition/VisualRecognition.cs | 285 +++++++++++++++++- 1 file changed, 282 insertions(+), 3 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 4304e7e0c..50753f164 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -120,7 +120,7 @@ public class VisualRecognition : IWatsonService /// /// The collection config. /// Optional data - public delegate void OnAddCollectionimages(CollectionsConfig config, string data); + public delegate void OnAddCollectionImage(CollectionsConfig config, string data); /// /// This callback is used by the DeleteCollectionImage() method. /// @@ -1462,11 +1462,275 @@ private void OnGetCollectionResp(RESTConnector.Request req, RESTConnector.Respon #endregion #region Get Collection Images - //List 100 images in a collection + /// + /// List 100 images in a collection + /// + /// The callback. + /// The requested collection identifier. + /// Custom data. + /// Returns true if succeess, false if failure. + public bool GetCollectionImages(OnGetCollectionImages callback, string collectionID, string customData = default(string)) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException(collectionID); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGES, collectionID)); + if (connector == null) + return false; + + GetCollectionImagesReq req = new GetCollectionImagesReq(); + req.Callback = callback; + req.Data = customData; + req.CollectionID = collectionID; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnGetCollectionImagesResp; + + return connector.Send(req); + } + + private class GetCollectionImagesReq : RESTConnector.Request + { + /// + /// OnGetCollections callback. + /// + public OnGetCollectionImages Callback { get; set; } + /// + /// Collection identifier of the requested collection. + /// + public string CollectionID { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnGetCollectionImagesResp(RESTConnector.Request req, RESTConnector.Response resp) + { + GetCollectionImages collectionImages = new GetCollectionImages(); + if (resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); + + object obj = collectionImages; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch (Exception e) + { + Log.Error("VisualRecognition", "GetCollectionImages Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((GetCollectionImagesReq)req).Callback != null) + ((GetCollectionImagesReq)req).Callback(resp.Success ? collectionImages : null, ((GetCollectionImagesReq)req).Data); + } #endregion #region Add Collection Images - //Add images to a collection + /// + /// Add an image to a collection via image path on file system and metadata as dictionary. + /// + /// The callback. + /// The identifier of the collection to add images to. + /// The path in the filesystem of the image to add. + /// Optional Dictionary key value pairs of metadata associated with the specified image. + /// Optional custom data. + /// Returns true if succeess, false if failure. + public bool AddCollectionImage(OnAddCollectionImage callback, string collectionID, string imagePath, Dictionary metadata = null, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (string.IsNullOrEmpty(imagePath)) + throw new ArgumentNullException("imagePath"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + byte[] imageData = null; + if (!string.IsNullOrEmpty(imagePath)) + { + if (LoadFile != null) + { + imageData = LoadFile(imagePath); + } + else + { +#if !UNITY_WEBPLAYER + imageData = File.ReadAllBytes(imagePath); +#endif + } + + if (imageData == null) + Log.Error("VisualRecognition", "Failed to upload {0}!", imagePath); + } + + return AddCollectionImage(callback, collectionID, imageData, GetMetadataJson(metadata), customData); + } + + /// + /// Add an image to a collection via image path on file system and metadata path on file system. + /// + /// The callback. + /// The identifier of the collection to add images to. + /// The path in the filesystem of the image to add. + /// Optional path to metadata json associated with the specified image. + /// Optional custom data. + /// Returns true if succeess, false if failure. + public bool AddCollectionImage(OnAddCollectionImage callback, string collectionID, string imagePath, string metadataPath = null, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (string.IsNullOrEmpty(imagePath)) + throw new ArgumentNullException("imagePath"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + byte[] imageData = null; + if (!string.IsNullOrEmpty(imagePath)) + { + if (LoadFile != null) + { + imageData = LoadFile(imagePath); + } + else + { +#if !UNITY_WEBPLAYER + imageData = File.ReadAllBytes(imagePath); +#endif + } + + if (imageData == null) + Log.Error("VisualRecognition", "Failed to upload {0}!", imagePath); + } + + string metadata = null; + if (!string.IsNullOrEmpty(metadataPath)) + { + metadata = File.ReadAllText(metadataPath); + + if (string.IsNullOrEmpty(metadata)) + Log.Error("VisualRecognition", "Failed to read {0}!", imagePath); + } + + return AddCollectionImage(callback, collectionID, imageData, metadata, customData); + } + + /// + /// Add an image to a collection. + /// + /// The callback. + /// The identifier of the collection to add images to. + /// The byte[] data of the image to add. + /// Optional json metadata associated with the specified image. + /// Optional custom data. + /// + public bool AddCollectionImage(OnAddCollectionImage callback, string collectionID, byte[] imageData, string metadata = null, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (imageData == default(byte[])) + throw new WatsonException("Image data is required!"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGES, collectionID)); + if (connector == null) + return false; + + AddCollectionImageReq req = new AddCollectionImageReq(); + req.Callback = callback; + req.CollectionID = collectionID; + req.ImageData = imageData; + req.Metadata = metadata; + req.Data = customData; + + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Forms = new Dictionary(); + req.Forms["image_file"] = new RESTConnector.Form(imageData); + req.Forms["metadata"] = new RESTConnector.Form(metadata); + + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnAddCollectionImageResp; + + return connector.Send(req); + } + + private class AddCollectionImageReq : RESTConnector.Request + { + /// + /// OnCreateCollection callback. + /// + public OnAddCollectionImage Callback { get; set; } + /// + /// The collection identifier to add images to. + /// + public string CollectionID { get; set; } + /// + /// Byte array of Image Data to add to the collection. + /// + public byte[] ImageData { get; set; } + /// + /// Json metadata associated with this image. + /// + public string Metadata { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnAddCollectionImageResp(RESTConnector.Request req, RESTConnector.Response resp) + { + CollectionsConfig collectionsConfig = new CollectionsConfig(); + if (resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); + + object obj = collectionsConfig; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch (Exception e) + { + Log.Error("VisualRecognition", "OnCreateCollectionResp Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((AddCollectionImageReq)req).Callback != null) + ((AddCollectionImageReq)req).Callback(resp.Success ? collectionsConfig : null, ((AddCollectionImageReq)req).Data); + } #endregion #region Delete Image @@ -1514,6 +1778,21 @@ private string GetMimeType(string imagePath) return mimeType; } + + private string GetMetadataJson(Dictionary metadata) + { + string json = "{"; + string metadataItem = "\n\t\"{0}\":\"{1}\""; + + foreach(KeyValuePair kv in metadata) + { + json += string.Format(metadataItem, kv.Key, kv.Value); + } + + json += "\n}"; + + return json; + } #endregion #region IWatsonService implementation From f09d706d41751cfea14a1f6c8321921e6b3fda8d Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 10:18:25 -0500 Subject: [PATCH 31/43] delete collection image --- .../VisualRecognition/VisualRecognition.cs | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 50753f164..f1b27aff1 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1734,7 +1734,70 @@ private void OnAddCollectionImageResp(RESTConnector.Request req, RESTConnector.R #endregion #region Delete Image - //Delete an image + /// + /// Deletes an image from a collection. + /// + /// The OnDeleteCollection callback. + /// The collection identifier holding the image to delete. + /// The identifier of the image to delete. + /// Optional custom data. + /// Returns true if succeess, false if failure. + public bool DeleteCollectionImage(OnDeleteCollectionImage callback, string collectionID, string imageID, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (string.IsNullOrEmpty(imageID)) + throw new ArgumentNullException("imageID"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGE, collectionID, imageID)); + if (connector == null) + return false; + + DeleteCollectionImageReq req = new DeleteCollectionImageReq(); + req.Callback = callback; + req.CollectionID = collectionID; + req.ImageID = imageID; + req.Data = customData; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Delete = true; + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnDeleteCollectionImageResp; + + return connector.Send(req); + } + + private class DeleteCollectionImageReq : RESTConnector.Request + { + /// + /// OnDeleteCollection callback. + /// + public OnDeleteCollectionImage Callback { get; set; } + /// + /// Collection identifier containing the image to be deleted. + /// + public string CollectionID { get; set; } + /// + /// The identifier of the image to be deleted. + /// + public string ImageID { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnDeleteCollectionImageResp(RESTConnector.Request req, RESTConnector.Response resp) + { + if (((DeleteCollectionImageReq)req).Callback != null) + ((DeleteCollectionImageReq)req).Callback(resp.Success, ((DeleteCollectionImageReq)req).Data); + } #endregion #region Get Image From 8852a349317064df84223df09f7e840913c940fb Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 10:53:32 -0500 Subject: [PATCH 32/43] delete image metadata --- .../VisualRecognition/VisualRecognition.cs | 149 +++++++++++++++++- 1 file changed, 147 insertions(+), 2 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index f1b27aff1..6b3f79545 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1801,11 +1801,156 @@ private void OnDeleteCollectionImageResp(RESTConnector.Request req, RESTConnecto #endregion #region Get Image - //List image details + /// + /// List an image's details. + /// + /// The callback. + /// The requested collection identifier. + /// Custom data. + /// Returns true if succeess, false if failure. + public bool GetImage(OnGetImageDetails callback, string collectionID, string imageID, string customData = default(string)) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException(collectionID); + if (string.IsNullOrEmpty(imageID)) + throw new ArgumentNullException(imageID); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGES, collectionID)); + if (connector == null) + return false; + + GetCollectionImageReq req = new GetCollectionImageReq(); + req.Callback = callback; + req.Data = customData; + req.CollectionID = collectionID; + req.ImageID = imageID; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnGetCollectionImageResp; + + return connector.Send(req); + } + + private class GetCollectionImageReq : RESTConnector.Request + { + /// + /// OnGetCollections callback. + /// + public OnGetImageDetails Callback { get; set; } + /// + /// Collection identifier of the requested collection. + /// + public string CollectionID { get; set; } + /// + /// Image identifier for the requested collection. + /// + public string ImageID { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnGetCollectionImageResp(RESTConnector.Request req, RESTConnector.Response resp) + { + GetCollectionsBrief image = new GetCollectionsBrief(); + if (resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); + + object obj = image; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch (Exception e) + { + Log.Error("VisualRecognition", "GetCollectionImage Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((GetCollectionImageReq)req).Callback != null) + ((GetCollectionImageReq)req).Callback(resp.Success ? image : null, ((GetCollectionImageReq)req).Data); + } #endregion #region Delete Image Metadata - //Delete image metadata + /// + /// Deletes an image metadata. + /// + /// The Callback. + /// The collection identifier holding the image metadata to delete. + /// The identifier of the image metadata to delete. + /// Optional custom data. + /// Returns true if succeess, false if failure. + public bool DeleteCollectionImage(OnDeleteImageMetadata callback, string collectionID, string imageID, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (string.IsNullOrEmpty(imageID)) + throw new ArgumentNullException("imageID"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGE_METADATA, collectionID, imageID)); + if (connector == null) + return false; + + DeleteCollectionImageMetadataReq req = new DeleteCollectionImageMetadataReq(); + req.Callback = callback; + req.CollectionID = collectionID; + req.ImageID = imageID; + req.Data = customData; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Delete = true; + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnDeleteCollectionImageMetadataResp; + + return connector.Send(req); + } + + private class DeleteCollectionImageMetadataReq : RESTConnector.Request + { + /// + /// OnDeleteCollection callback. + /// + public OnDeleteImageMetadata Callback { get; set; } + /// + /// Collection identifier containing the image to be deleted. + /// + public string CollectionID { get; set; } + /// + /// The identifier of the image to be deleted. + /// + public string ImageID { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnDeleteCollectionImageMetadataResp(RESTConnector.Request req, RESTConnector.Response resp) + { + if (((DeleteCollectionImageMetadataReq)req).Callback != null) + ((DeleteCollectionImageMetadataReq)req).Callback(resp.Success, ((DeleteCollectionImageMetadataReq)req).Data); + } #endregion #region List Image Metadata From 14779d0cb4d19cdab74f8b583b3995f2296dc5ef Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 11:16:20 -0500 Subject: [PATCH 33/43] GetImageMetadata --- .../VisualRecognition/VisualRecognition.cs | 87 ++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 6b3f79545..b6babe57b 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1821,7 +1821,7 @@ private void OnDeleteCollectionImageResp(RESTConnector.Request req, RESTConnecto if (string.IsNullOrEmpty(mp_ApiKey)) throw new WatsonException("No API Key was found!"); - RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGES, collectionID)); + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGE, collectionID, imageID)); if (connector == null) return false; @@ -1954,7 +1954,90 @@ private void OnDeleteCollectionImageMetadataResp(RESTConnector.Request req, REST #endregion #region List Image Metadata - //List image metadata. + /// + /// List image metadata.. + /// + /// The callback. + /// The requested collection identifier. + /// The requested image identifier. + /// Custom data. + /// Returns true if succeess, false if failure. + public bool GetMetadata(OnGetImageMetadata callback, string collectionID, string imageID, string customData = default(string)) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException(collectionID); + if (string.IsNullOrEmpty(imageID)) + throw new ArgumentNullException(imageID); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_IMAGE_METADATA, collectionID, imageID)); + if (connector == null) + return false; + + GetCollectionImageMetadataReq req = new GetCollectionImageMetadataReq(); + req.Callback = callback; + req.Data = customData; + req.CollectionID = collectionID; + req.ImageID = imageID; + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnGetCollectionImageMetadataResp; + + return connector.Send(req); + } + + private class GetCollectionImageMetadataReq : RESTConnector.Request + { + /// + /// OnGetCollections callback. + /// + public OnGetImageMetadata Callback { get; set; } + /// + /// Collection identifier of the requested metadata. + /// + public string CollectionID { get; set; } + /// + /// Image identifier for the requested metadata. + /// + public string ImageID { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnGetCollectionImageMetadataResp(RESTConnector.Request req, RESTConnector.Response resp) + { + GetCollectionsBrief image = new GetCollectionsBrief(); + if (resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); + + object obj = image; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch (Exception e) + { + Log.Error("VisualRecognition", "GetCollectionImage Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((GetCollectionImageReq)req).Callback != null) + ((GetCollectionImageReq)req).Callback(resp.Success ? image : null, ((GetCollectionImageReq)req).Data); + } #endregion #region Find Similar Images From 9d039417d9bdc4aeb992a9b993d6c3668597ce48 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 11:33:05 -0500 Subject: [PATCH 34/43] find similar --- .../VisualRecognition/VisualRecognition.cs | 138 +++++++++++++++++- 1 file changed, 137 insertions(+), 1 deletion(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index b6babe57b..646d3a04d 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -2041,7 +2041,143 @@ private void OnGetCollectionImageMetadataResp(RESTConnector.Request req, RESTCon #endregion #region Find Similar Images - //Find Similar Images + /// + /// Find Similar Images by image path. + /// + /// The callback. + /// The identifier of the collection to add images to. + /// The path in the filesystem of the image to query. + /// The number of similar results you want returned. Default limit is 10 results, you can specify a maximum limit of 100 results. + /// Optional custom data. + /// Returns true if succeess, false if failure. + public bool FindSimilar(OnFindSimilar callback, string collectionID, string imagePath, int limit = 10, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (string.IsNullOrEmpty(imagePath)) + throw new ArgumentNullException("imagePath"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + byte[] imageData = null; + if (!string.IsNullOrEmpty(imagePath)) + { + if (LoadFile != null) + { + imageData = LoadFile(imagePath); + } + else + { +#if !UNITY_WEBPLAYER + imageData = File.ReadAllBytes(imagePath); +#endif + } + + if (imageData == null) + Log.Error("VisualRecognition", "Failed to upload {0}!", imagePath); + } + + return FindSimilar(callback, collectionID, imageData, limit, customData); + } + + /// + /// Find Similar Images by byte[]. + /// + /// The callback. + /// The identifier of the collection to add images to. + /// The byte[] data of the image to query. + /// The number of similar results you want returned. Default limit is 10 results, you can specify a maximum limit of 100 results. + /// Optional custom data. + /// + public bool FindSimilar(OnFindSimilar callback, string collectionID, byte[] imageData, int limit = 10, string customData = null) + { + if (callback == null) + throw new ArgumentNullException("callback"); + if (string.IsNullOrEmpty(collectionID)) + throw new ArgumentNullException("collectionID"); + if (imageData == default(byte[])) + throw new WatsonException("Image data is required!"); + if (string.IsNullOrEmpty(mp_ApiKey)) + mp_ApiKey = Config.Instance.GetAPIKey(SERVICE_ID); + if (string.IsNullOrEmpty(mp_ApiKey)) + throw new WatsonException("No API Key was found!"); + + RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_COLLECTION_FIND_SIMILAR, collectionID)); + if (connector == null) + return false; + + FindSimilarReq req = new FindSimilarReq(); + req.Callback = callback; + req.CollectionID = collectionID; + req.ImageData = imageData; + req.Limit = limit; + req.Data = customData; + + req.Parameters["api_key"] = mp_ApiKey; + req.Parameters["version"] = VisualRecognitionVersion.Version; + req.Forms = new Dictionary(); + req.Forms["image_file"] = new RESTConnector.Form(imageData); + + req.Timeout = 20.0f * 60.0f; + req.OnResponse = OnFindSimilarResp; + + return connector.Send(req); + } + + private class FindSimilarReq : RESTConnector.Request + { + /// + /// OnCreateCollection callback. + /// + public OnFindSimilar Callback { get; set; } + /// + /// The collection identifier to add images to. + /// + public string CollectionID { get; set; } + /// + /// Byte array of Image Data to add to the collection. + /// + public byte[] ImageData { get; set; } + /// + /// Json metadata associated with this image. + /// + public int Limit { get; set; } + /// + /// Optional data. + /// + public string Data { get; set; } + } + + private void OnFindSimilarResp(RESTConnector.Request req, RESTConnector.Response resp) + { + SimilarImagesConfig config = new SimilarImagesConfig(); + if (resp.Success) + { + try + { + fsData data = null; + fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data); + + object obj = config; + r = sm_Serializer.TryDeserialize(data, obj.GetType(), ref obj); + + if (!r.Succeeded) + throw new WatsonException(r.FormattedMessages); + } + catch (Exception e) + { + Log.Error("VisualRecognition", "OnCreateCollectionResp Exception: {0}", e.ToString()); + resp.Success = false; + } + } + + if (((FindSimilarReq)req).Callback != null) + ((FindSimilarReq)req).Callback(resp.Success ? config : null, ((FindSimilarReq)req).Data); + } #endregion #region private methods From f196f49f63abdf523c246ee79d6f9e5c95263a8e Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 17:12:20 -0500 Subject: [PATCH 35/43] start unit test framework --- .../VisualRecognition/VisualRecognition.cs | 2 +- Scripts/UnitTests/TestVisualRecognition.cs | 282 +++++++++++++----- 2 files changed, 213 insertions(+), 71 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index 646d3a04d..e9693d605 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1895,7 +1895,7 @@ private void OnGetCollectionImageResp(RESTConnector.Request req, RESTConnector.R /// The identifier of the image metadata to delete. /// Optional custom data. /// Returns true if succeess, false if failure. - public bool DeleteCollectionImage(OnDeleteImageMetadata callback, string collectionID, string imageID, string customData = null) + public bool DeleteCollectionImageMetadata(OnDeleteImageMetadata callback, string collectionID, string imageID, string customData = null) { if (callback == null) throw new ArgumentNullException("callback"); diff --git a/Scripts/UnitTests/TestVisualRecognition.cs b/Scripts/UnitTests/TestVisualRecognition.cs index 650bc5de9..8da9889f9 100755 --- a/Scripts/UnitTests/TestVisualRecognition.cs +++ b/Scripts/UnitTests/TestVisualRecognition.cs @@ -42,8 +42,21 @@ public class TestVisualRecognition : UnitTest bool m_DetectFacesPOSTTested = false; bool m_RecognizeTextGETTested = false; bool m_RecognizeTextPOSTTested = false; - bool m_DeleteTested = false; - + bool m_DeleteClassifierTested = false; + + bool m_ListCollectionsTested = false; + bool m_CreateCollectionTested = false; + bool m_DeleteCollectionTested = false; + bool m_RetrieveCollectionDetailsTested = false; + bool m_ListImagesTested = false; + bool m_AddImagesToCollectionTested = false; + bool m_DeleteImageFromCollectionTested = false; + bool m_ListImageDetailsTested = false; + bool m_DeleteImageMetadataTested = false; + bool m_ListImageMetadataTested = false; + bool m_FindSimilarTested = false; + + bool m_TrainClassifier = false; bool m_IsClassifierReady = false; bool m_HasUpdatedClassifier = false; @@ -56,6 +69,9 @@ public class TestVisualRecognition : UnitTest private string m_ImageFaceURL = "https://upload.wikimedia.org/wikipedia/commons/e/e9/Official_portrait_of_Barack_Obama.jpg"; // Obama image private string m_ImageTextURL = "http://i.stack.imgur.com/ZS6nH.png"; // image with text + private string m_CreatedCollectionID; + private string m_CreatedCollectionImage; + public override IEnumerator RunTest() { // test get classifiers @@ -63,14 +79,14 @@ public override IEnumerator RunTest() m_VisualRecognition.GetClassifiers(OnGetClassifiers); while (!m_GetClassifiersTested) yield return null; - + // test find classifier Log.Debug("TestVisualRecognition", "Finding classifier {0}!", m_ClassifierName); m_VisualRecognition.FindClassifier(OnFindClassifier, m_ClassifierName); - while(!m_FindClassifierTested) + while (!m_FindClassifierTested) yield return null; - - if(m_TrainClassifier) + + if (m_TrainClassifier) { // test train classifier Log.Debug("TestVisualRecognition", "Training classifier!"); @@ -79,25 +95,25 @@ public override IEnumerator RunTest() Dictionary positiveExamples = new Dictionary(); positiveExamples.Add(m_ClassName_Giraffe, m_positiveExamplesPath); Test(m_VisualRecognition.TrainClassifier(OnTrainClassifier, m_ClassifierName, positiveExamples, m_negativeExamplesPath)); - while(!m_TrainClasifierTested) + while (!m_TrainClasifierTested) yield return null; } // Wait until classifier is ready - if(!m_IsClassifierReady) + if (!m_IsClassifierReady) { Log.Debug("TestVisualRecognition", "Checking classifier {0} status!", m_ClassifierId); CheckClassifierStatus(OnCheckClassifierStatus); while (!m_IsClassifierReady) yield return null; } - - if(!string.IsNullOrEmpty(m_ClassifierId)) + + if (!string.IsNullOrEmpty(m_ClassifierId)) { // test get classifier Log.Debug("TestVisualRecognition", "Getting classifier {0}!", m_ClassifierId); m_VisualRecognition.GetClassifier(OnGetClassifier, m_ClassifierId); - while(!m_GetClassifierTested) + while (!m_GetClassifierTested) yield return null; // Update classifier @@ -115,64 +131,134 @@ public override IEnumerator RunTest() while (!m_IsUpdatedClassifierReady) yield return null; - string[] m_owners = {"IBM", "me"}; - string[] m_classifierIds = {"default", m_ClassifierId}; - + string[] m_owners = { "IBM", "me" }; + string[] m_classifierIds = { "default", m_ClassifierId }; + // test classify image get Log.Debug("TestVisualRecognition", "Classifying image using GET!"); m_VisualRecognition.Classify(OnClassifyGet, m_ImageURL, m_owners, m_classifierIds); - while(!m_ClassifyGETTested) + while (!m_ClassifyGETTested) yield return null; - + // test classify image post Log.Debug("TestVisualRecognition", "Classifying image using POST!"); string m_classifyImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_to_classify.jpg"; m_VisualRecognition.Classify(m_classifyImagePath, OnClassifyPost, m_owners, m_classifierIds); - while(!m_ClassifyPOSTTested) + while (!m_ClassifyPOSTTested) yield return null; } // test detect faces get Log.Debug("TestVisualRecognition", "Detecting face image using GET!"); m_VisualRecognition.DetectFaces(OnDetectFacesGet, m_ImageFaceURL); - while(!m_DetectFacesGETTested) + while (!m_DetectFacesGETTested) yield return null; // test detect faces post Log.Debug("TestVisualRecognition", "Detecting face image using POST!"); string m_detectFaceImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; m_VisualRecognition.DetectFaces(m_detectFaceImagePath, OnDetectFacesPost); - while(!m_DetectFacesPOSTTested) + while (!m_DetectFacesPOSTTested) yield return null; // test recognize text get Log.Debug("TestVisualRecognition", "Recognizing text image using GET!"); m_VisualRecognition.RecognizeText(OnRecognizeTextGet, m_ImageTextURL); - while(!m_RecognizeTextGETTested) + while (!m_RecognizeTextGETTested) yield return null; // test recognize text post Log.Debug("TestVisualRecognition", "Recognizing text image using POST!"); string m_recognizeTextImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/from_platos_apology.png"; m_VisualRecognition.RecognizeText(m_recognizeTextImagePath, OnRecognizeTextPost); - while(!m_RecognizeTextPOSTTested) + while (!m_RecognizeTextPOSTTested) yield return null; // test delete classifier Log.Debug("TestVisualRecognition", "Deleting classifier {0}!", m_ClassifierId); m_VisualRecognition.DeleteClassifier(OnDeleteClassifier, m_ClassifierId); - while(!m_DeleteTested) + while (!m_DeleteClassifierTested) + yield return null; + + // test list collections + Log.Debug("TestVisualRecognition", "Attempting to list collections!"); + m_VisualRecognition.GetCollections(OnGetCollections); + while (!m_ListCollectionsTested) + yield return null; + + // test create collection + Log.Debug("TestVisualRecognition", "Attempting to create collection!"); + m_VisualRecognition.CreateCollection(OnCreateCollection, "unity-integration-test-collection"); + while (!m_CreateCollectionTested) + yield return null; + + // test retrive collection details + Log.Debug("TestVisualRecognition", "Attempting to retrieve collection details!"); + m_VisualRecognition.GetCollection(OnGetCollection, m_CreatedCollectionID); + while (!m_RetrieveCollectionDetailsTested) + yield return null; + + // test add images to collection + Log.Debug("TestVisualRecognition", "Attempting to add images to collection!"); + string m_collectionImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_to_classify.jpg"; + Dictionary imageMetadata = new Dictionary(); + imageMetadata.Add("key1", "value1"); + imageMetadata.Add("key2", "value2"); + imageMetadata.Add("key3", "value3"); + m_VisualRecognition.AddCollectionImage(OnAddImageToCollection, m_CreatedCollectionID, m_collectionImagePath, imageMetadata); + while (!m_AddImagesToCollectionTested) + yield return null; + + // test list images + Log.Debug("TestVisualRecognition", "Attempting to list images!"); + m_VisualRecognition.GetCollections(OnGetCollections); + while (!m_ListImagesTested) yield return null; + // test list image details + Log.Debug("TestVisualRecognition", "Attempting to list image details!"); + m_VisualRecognition.GetImage(OnGetImage, m_CreatedCollectionID, m_CreatedCollectionImage); + while (!m_ListImageDetailsTested) + yield return null; + + // test list image metadata + Log.Debug("TestVisualRecognition", "Attempting to list image metadata!"); + m_VisualRecognition.GetMetadata(OnGetMetadata, m_CreatedCollectionID, m_CreatedCollectionImage); + while (!m_ListImageMetadataTested) + yield return null; + + // test find similar + Log.Debug("TestVisualRecognition", "Attempting to find similar!"); + m_VisualRecognition.FindSimilar(OnFindSimilar, m_CreatedCollectionID, m_collectionImagePath); + while (!m_FindSimilarTested) + yield return null; + + // test delete image metadata + Log.Debug("TestVisualRecognition", "Attempting to delete metadata!"); + m_VisualRecognition.DeleteCollectionImageMetadata(OnDeleteMetadata, m_CreatedCollectionID, m_CreatedCollectionImage); + while (!m_DeleteImageMetadataTested) + yield return null; + + // test delete image from collection + Log.Debug("TestVisualRecognition", "Attempting to delete image from collection!"); + m_VisualRecognition.DeleteCollectionImage(OnDeleteCollectionImage, m_CreatedCollectionID, m_CreatedCollectionImage); + while (!m_DeleteImageFromCollectionTested) + yield return null; + + // test delete collection + Log.Debug("TestVisualRecognition", "Attempting to delete collection!"); + m_VisualRecognition.DeleteCollection(OnDeleteCollection, m_CreatedCollectionID); + while (!m_DeleteCollectionTested) + yield return null; yield break; } - + private void OnFindClassifier(GetClassifiersPerClassifierVerbose classifier, string customData) { if (classifier != null) { Log.Status("TestVisualRecognition", "Find Result, Classifier ID: {0}, Status: {1}", classifier.classifier_id, classifier.status); - if(classifier.status == "ready") + if (classifier.status == "ready") { m_TrainClassifier = false; m_IsClassifierReady = true; @@ -204,16 +290,16 @@ private void OnTrainClassifier(GetClassifiersPerClassifierVerbose classifier, st m_TrainClasifierTested = true; } - private void OnGetClassifiers (GetClassifiersTopLevelBrief classifiers, string customData) + private void OnGetClassifiers(GetClassifiersTopLevelBrief classifiers, string customData) { Test(classifiers != null); - if(classifiers != null && classifiers.classifiers.Length > 0) + if (classifiers != null && classifiers.classifiers.Length > 0) { Log.Debug("TestVisualRecognition", "{0} classifiers found!", classifiers.classifiers.Length); -// foreach(GetClassifiersPerClassifierBrief classifier in classifiers.classifiers) -// { -// Log.Debug("TestVisualRecognition", "Classifier: " + classifier.name + ", " + classifier.classifier_id); -// } + // foreach(GetClassifiersPerClassifierBrief classifier in classifiers.classifiers) + // { + // Log.Debug("TestVisualRecognition", "Classifier: " + classifier.name + ", " + classifier.classifier_id); + // } } else { @@ -226,7 +312,7 @@ private void OnGetClassifiers (GetClassifiersTopLevelBrief classifiers, string c private void OnGetClassifier(GetClassifiersPerClassifierVerbose classifier, string customData) { Test(classifier != null); - if(classifier != null) + if (classifier != null) { Log.Debug("TestVisualRecognition", "Classifier {0} found! Classifier name: {1}", classifier.classifier_id, classifier.name); foreach (Class classifierClass in classifier.classes) @@ -255,16 +341,16 @@ private void OnUpdateClassifier(GetClassifiersPerClassifierVerbose classifier, s private void OnClassifyGet(ClassifyTopLevelMultiple classify, string customData) { Test(classify != null); - if(classify != null) + if (classify != null) { Log.Debug("TestVisualRecognition", "ClassifyImage GET images processed: " + classify.images_processed); - foreach(ClassifyTopLevelSingle image in classify.images) + foreach (ClassifyTopLevelSingle image in classify.images) { Log.Debug("TestVisualRecognition", "\tClassifyImage GET source_url: " + image.source_url + ", resolved_url: " + image.resolved_url); - foreach(ClassifyPerClassifier classifier in image.classifiers) + foreach (ClassifyPerClassifier classifier in image.classifiers) { Log.Debug("TestVisualRecognition", "\t\tClassifyImage GET classifier_id: " + classifier.classifier_id + ", name: " + classifier.name); - foreach(ClassResult classResult in classifier.classes) + foreach (ClassResult classResult in classifier.classes) Log.Debug("TestVisualRecognition", "\t\t\tClassifyImage GET class: " + classResult.m_class + ", score: " + classResult.score + ", type_hierarchy: " + classResult.type_hierarchy); } } @@ -280,16 +366,16 @@ private void OnClassifyGet(ClassifyTopLevelMultiple classify, string customData) private void OnClassifyPost(ClassifyTopLevelMultiple classify, string customData) { Test(classify != null); - if(classify != null) + if (classify != null) { Log.Debug("TestVisualRecognition", "ClassifyImage POST images processed: " + classify.images_processed); - foreach(ClassifyTopLevelSingle image in classify.images) + foreach (ClassifyTopLevelSingle image in classify.images) { Log.Debug("TestVisualRecognition", "\tClassifyImage POST source_url: " + image.source_url + ", resolved_url: " + image.resolved_url); - foreach(ClassifyPerClassifier classifier in image.classifiers) + foreach (ClassifyPerClassifier classifier in image.classifiers) { Log.Debug("TestVisualRecognition", "\t\tClassifyImage POST classifier_id: " + classifier.classifier_id + ", name: " + classifier.name); - foreach(ClassResult classResult in classifier.classes) + foreach (ClassResult classResult in classifier.classes) Log.Debug("TestVisualRecognition", "\t\t\tClassifyImage POST class: " + classResult.m_class + ", score: " + classResult.score + ", type_hierarchy: " + classResult.type_hierarchy); } } @@ -305,13 +391,13 @@ private void OnClassifyPost(ClassifyTopLevelMultiple classify, string customData private void OnDetectFacesGet(FacesTopLevelMultiple multipleImages, string customData) { Test(multipleImages != null); - if(multipleImages != null) + if (multipleImages != null) { Log.Debug("TestVisualRecognition", "DetectFaces GET images processed: {0}", multipleImages.images_processed); - foreach(FacesTopLevelSingle faces in multipleImages.images) + foreach (FacesTopLevelSingle faces in multipleImages.images) { Log.Debug("TestVisualRecognition", "\tDetectFaces GET source_url: {0}, resolved_url: {1}", faces.source_url, faces.resolved_url); - foreach(OneFaceResult face in faces.faces) + foreach (OneFaceResult face in faces.faces) { Log.Debug("TestVisualRecognition", "\t\tDetectFaces GET Face location: {0}, {1}, {2}, {3}", face.face_location.left, face.face_location.top, face.face_location.width, face.face_location.height); Log.Debug("TestVisualRecognition", "\t\tDetectFaces GET Gender: {0}, Score: {1}", face.gender.gender, face.gender.score); @@ -331,13 +417,13 @@ private void OnDetectFacesGet(FacesTopLevelMultiple multipleImages, string custo private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, string customData) { Test(multipleImages != null); - if(multipleImages != null) + if (multipleImages != null) { Log.Debug("TestVisualRecognition", "DetectFaces POST images processed: {0}", multipleImages.images_processed); - foreach(FacesTopLevelSingle faces in multipleImages.images) + foreach (FacesTopLevelSingle faces in multipleImages.images) { Log.Debug("TestVisualRecognition", "\tDetectFaces POST source_url: {0}, resolved_url: {1}", faces.source_url, faces.resolved_url); - foreach(OneFaceResult face in faces.faces) + foreach (OneFaceResult face in faces.faces) { Log.Debug("TestVisualRecognition", "\t\tDetectFaces POST Face location: {0}, {1}, {2}, {3}", face.face_location.left, face.face_location.top, face.face_location.width, face.face_location.height); Log.Debug("TestVisualRecognition", "\t\tDetectFaces POST Gender: {0}, Score: {1}", face.gender.gender, face.gender.score); @@ -357,19 +443,19 @@ private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, string cust private void OnRecognizeTextGet(TextRecogTopLevelMultiple multipleImages, string customData) { Test(multipleImages != null); - if(multipleImages != null) + if (multipleImages != null) { Log.Debug("TestVisualRecognition", "RecognizeText GET images processed: {0}", multipleImages.images_processed); - foreach(TextRecogTopLevelSingle texts in multipleImages.images) + foreach (TextRecogTopLevelSingle texts in multipleImages.images) { Log.Debug("TestVisualRecognition", "\tRecognizeText GET source_url: {0}, resolved_url: {1}", texts.source_url, texts.resolved_url); Log.Debug("TestVisualRecognition", "\tRecognizeText GET text: {0}", texts.text); -// foreach(TextRecogOneWord text in texts.words) -// { -// Log.Debug("TestVisualRecognition", "\t\tRecognizeText GET text location: {0}, {1}, {2}, {3}", text.location.left, text.location.top, text.location.width, text.location.height); -// Log.Debug("TestVisualRecognition", "\t\tRecognizeText GET Line number: {0}", text.line_number); -// Log.Debug("TestVisualRecognition", "\t\tRecognizeText GET word: {0}, Score: {1}", text.word, text.score); -// } + // foreach(TextRecogOneWord text in texts.words) + // { + // Log.Debug("TestVisualRecognition", "\t\tRecognizeText GET text location: {0}, {1}, {2}, {3}", text.location.left, text.location.top, text.location.width, text.location.height); + // Log.Debug("TestVisualRecognition", "\t\tRecognizeText GET Line number: {0}", text.line_number); + // Log.Debug("TestVisualRecognition", "\t\tRecognizeText GET word: {0}, Score: {1}", text.word, text.score); + // } } m_RecognizeTextGETTested = true; @@ -383,19 +469,19 @@ private void OnRecognizeTextGet(TextRecogTopLevelMultiple multipleImages, string private void OnRecognizeTextPost(TextRecogTopLevelMultiple multipleImages, string customData) { Test(multipleImages != null); - if(multipleImages != null) + if (multipleImages != null) { Log.Debug("TestVisualRecognition", "RecognizeText POST images processed: {0}", multipleImages.images_processed); - foreach(TextRecogTopLevelSingle texts in multipleImages.images) + foreach (TextRecogTopLevelSingle texts in multipleImages.images) { Log.Debug("TestVisualRecognition", "\tRecognizeText POST source_url: {0}, resolved_url: {1}", texts.source_url, texts.resolved_url); Log.Debug("TestVisualRecognition", "\tRecognizeText POST text: {0}", texts.text); -// foreach(TextRecogOneWord text in texts.words) -// { -// Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST text location: {0}, {1}, {2}, {3}", text.location.left, text.location.top, text.location.width, text.location.height); -// Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST Line number: {0}", text.line_number); -// Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST word: {0}, Score: {1}", text.word, text.score); -// } + // foreach(TextRecogOneWord text in texts.words) + // { + // Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST text location: {0}, {1}, {2}, {3}", text.location.left, text.location.top, text.location.width, text.location.height); + // Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST Line number: {0}", text.line_number); + // Log.Debug("TestVisualRecognition", "\t\tRecognizeText POST word: {0}, Score: {1}", text.word, text.score); + // } } m_RecognizeTextPOSTTested = true; @@ -408,18 +494,18 @@ private void OnRecognizeTextPost(TextRecogTopLevelMultiple multipleImages, strin private void OnDeleteClassifier(bool success, string customData) { - if(success) + if (success) { m_VisualRecognition.FindClassifier(OnDeleteClassifierFinal, m_ClassifierName); } - m_DeleteTested = true; + m_DeleteClassifierTested = true; Test(success); } private void CheckClassifierStatus(VisualRecognition.OnGetClassifier callback, string customData = default(string)) { - if(!m_VisualRecognition.GetClassifier(callback, m_ClassifierId)) + if (!m_VisualRecognition.GetClassifier(callback, m_ClassifierId)) Log.Debug("TestVisualRecognition", "Get classifier failed!"); } @@ -427,19 +513,19 @@ private void OnCheckClassifierStatus(GetClassifiersPerClassifierVerbose classifi { Log.Debug("TestVisualRecognition", "classifier {0} is {1}!", classifier.classifier_id, classifier.status); - if(classifier.status == "unavailable" || classifier.status == "failed") + if (classifier.status == "unavailable" || classifier.status == "failed") { Log.Debug("TestVisualRecognition", "Deleting classifier!"); // classifier failed - delete! - if(!m_VisualRecognition.DeleteClassifier(OnCheckClassifierStatusDelete, classifier.classifier_id)) + if (!m_VisualRecognition.DeleteClassifier(OnCheckClassifierStatusDelete, classifier.classifier_id)) Log.Debug("TestVisualRecognition", "Failed to delete classifier {0}!", m_ClassifierId); } - else if(classifier.status == "training") + else if (classifier.status == "training") { CheckClassifierStatus(OnCheckClassifierStatus); } - else if(classifier.status == "ready") + else if (classifier.status == "ready") { m_IsClassifierReady = true; m_ClassifierId = classifier.classifier_id; @@ -462,7 +548,7 @@ private void OnCheckClassifierStatus(GetClassifiersPerClassifierVerbose classifi private void OnCheckClassifierStatusDelete(bool success, string customData) { - if(success) + if (success) { // train classifier again! m_TrainClasifierTested = false; @@ -471,7 +557,7 @@ private void OnCheckClassifierStatusDelete(bool success, string customData) private void OnDeleteClassifierFinal(GetClassifiersPerClassifierVerbose classifier, string customData) { - if(classifier == null) + if (classifier == null) { Log.Debug("TestVisualRecognition", "Classifier not found! Delete sucessful!"); } @@ -480,5 +566,61 @@ private void OnDeleteClassifierFinal(GetClassifiersPerClassifierVerbose classifi Log.Debug("TestVisualRecognition", "Classifier {0} found! Delete failed!", classifier.name); } } + + private void OnGetCollections(GetCollections collections, string customData) + { + + } + + private void OnCreateCollection(CreateCollection collection, string customData) + { + m_CreatedCollectionID = collection.collection_id; + + } + + private void OnDeleteCollection(bool success, string customData) + { + + } + + private void OnGetCollection(CreateCollection collection, string customData) + { + + } + + private void OnGetCollections(GetCollectionImages collections, string customData) + { + + } + + private void OnAddImageToCollection(CollectionsConfig images, string customData) + { + m_CreatedCollectionImage = images.images[0].image_id; + } + + private void OnDeleteCollectionImage(bool success, string customData) + { + + } + + private void OnGetImage(GetCollectionsBrief image, string customData) + { + + } + + private void OnDeleteMetadata(bool success, string customData) + { + + } + + private void OnGetMetadata(object responseObject, string customData) + { + Log.Debug("TestVisualRecognition", "ResponseObject: {0}", responseObject); + } + + private void OnFindSimilar(SimilarImagesConfig images, string customData) + { + + } } } From f506a803500339ba194837d833489b45051d2c9f Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 18:21:47 -0500 Subject: [PATCH 36/43] integration tests --- Scripts/UnitTests/TestVisualRecognition.cs | 78 +++++++++++++++++++--- 1 file changed, 70 insertions(+), 8 deletions(-) diff --git a/Scripts/UnitTests/TestVisualRecognition.cs b/Scripts/UnitTests/TestVisualRecognition.cs index 8da9889f9..9d59d8b33 100755 --- a/Scripts/UnitTests/TestVisualRecognition.cs +++ b/Scripts/UnitTests/TestVisualRecognition.cs @@ -512,7 +512,6 @@ private void OnDeleteClassifier(bool success, string customData) private void OnCheckClassifierStatus(GetClassifiersPerClassifierVerbose classifier, string customData) { Log.Debug("TestVisualRecognition", "classifier {0} is {1}!", classifier.classifier_id, classifier.status); - if (classifier.status == "unavailable" || classifier.status == "failed") { Log.Debug("TestVisualRecognition", "Deleting classifier!"); @@ -565,38 +564,101 @@ private void OnDeleteClassifierFinal(GetClassifiersPerClassifierVerbose classifi { Log.Debug("TestVisualRecognition", "Classifier {0} found! Delete failed!", classifier.name); } + Test(classifier == null); } private void OnGetCollections(GetCollections collections, string customData) { - + if(collections != null) + { + Log.Debug("TestVisualRecognition", "Get Collections succeeded!"); + foreach (CreateCollection collection in collections.collections) + { + Log.Debug("TestVisualRecognition", "collectionID: {0} | collection name: {1} | number of images: {2}", collection.collection_id, collection.name, collection.images); + } + } + else + { + Log.Debug("TestVisualRecognition", "Get Collections failed!"); + } + + Test(collections != null); } private void OnCreateCollection(CreateCollection collection, string customData) { - m_CreatedCollectionID = collection.collection_id; - + if(collection != null) + { + Log.Debug("TestVisualRecognition", "Create Collection succeeded!"); + Log.Debug("TestVisualRecognition", "collectionID: {0} | collection name: {1} | collection images: {2}", collection.collection_id, collection.name, collection.images); + + m_CreatedCollectionID = collection.collection_id; + } + else + { + Log.Debug("TestVisualRecognition", "Create Collection failed!"); + } + + Test(collection != null); } private void OnDeleteCollection(bool success, string customData) { + if(success) + Log.Debug("TestVisualRecognition", "Delete Collection succeeded!"); + else + Log.Debug("TestVisualRecognition", "Delete Collection failed!"); + Test(success); } private void OnGetCollection(CreateCollection collection, string customData) { - + if (collection != null) + { + Log.Debug("TestVisualRecognition", "Get Collection succeded!"); + Log.Debug("TestVisualRecognition", "collectionID: {0} | collection name: {1} | collection images: {2}", collection.collection_id, collection.name, collection.images); + } + else + { + Log.Debug("TestVisualRecognition", "Get Collection failed!"); + + } + + Test(collection != null); } private void OnGetCollections(GetCollectionImages collections, string customData) { - + if(collections != null) + { + Log.Debug("TestVisualRecognition", "Get Collections succeded!"); + foreach(GetCollectionsBrief collection in collections.images) + Log.Debug("TestVisualRecognition", "imageID: {0} | image file: {1} | image metadataOnGetCollections: {2}", collection.image_id, collection.image_file, collection.metadata.ToString()); + } + else + { + Log.Debug("TestVisualRecognition", "Get Collections failed!"); + } + + Test(collections != null); } private void OnAddImageToCollection(CollectionsConfig images, string customData) { - m_CreatedCollectionImage = images.images[0].image_id; - } + if(images != null) + { + Log.Debug("TestVisualRecognition", "Add image to collection succeeded!"); + m_CreatedCollectionImage = images.images[0].image_id; + Log.Debug("TestVisualRecognition", "images processed: {0}", images.images_processed); + foreach (CollectionImagesConfig image in images.images) + Log.Debug("TestVisualRecognition", "imageID: {0} | image_file: {1} | image metadata: {1}", image.image_id, image.image_file, image.metadata.ToString()); + } + else + { + Log.Debug("TestVisualRecognition", "Add image to collection failed!"); + } + } private void OnDeleteCollectionImage(bool success, string customData) { From c470075ecd051b5c09504b98f1d2befceb176035 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 18:41:13 -0500 Subject: [PATCH 37/43] WIP - integration tests --- Scripts/UnitTests/TestVisualRecognition.cs | 48 ++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/Scripts/UnitTests/TestVisualRecognition.cs b/Scripts/UnitTests/TestVisualRecognition.cs index 9d59d8b33..9c987f177 100755 --- a/Scripts/UnitTests/TestVisualRecognition.cs +++ b/Scripts/UnitTests/TestVisualRecognition.cs @@ -582,6 +582,7 @@ private void OnGetCollections(GetCollections collections, string customData) Log.Debug("TestVisualRecognition", "Get Collections failed!"); } + m_ListCollectionsTested = true; Test(collections != null); } @@ -599,6 +600,7 @@ private void OnCreateCollection(CreateCollection collection, string customData) Log.Debug("TestVisualRecognition", "Create Collection failed!"); } + m_CreateCollectionTested = true; Test(collection != null); } @@ -609,6 +611,7 @@ private void OnDeleteCollection(bool success, string customData) else Log.Debug("TestVisualRecognition", "Delete Collection failed!"); + m_DeleteCollectionTested = true; Test(success); } @@ -625,6 +628,7 @@ private void OnGetCollection(CreateCollection collection, string customData) } + m_RetrieveCollectionDetailsTested = true; Test(collection != null); } @@ -641,6 +645,7 @@ private void OnGetCollections(GetCollectionImages collections, string customData Log.Debug("TestVisualRecognition", "Get Collections failed!"); } + m_ListCollectionsTested = true; Test(collections != null); } @@ -658,31 +663,68 @@ private void OnAddImageToCollection(CollectionsConfig images, string customData) { Log.Debug("TestVisualRecognition", "Add image to collection failed!"); } + + Test(images != null); } private void OnDeleteCollectionImage(bool success, string customData) { + if (success) + Log.Debug("TestVisualRecognition", "Delete collection image succeeded!"); + else + Log.Debug("TestVisualRecognition", "Delete collection image failed!"); - } + Test(success); + } private void OnGetImage(GetCollectionsBrief image, string customData) { + if(image != null) + { + Log.Debug("TestVisualRecognition", "GetImage succeeded!"); + Log.Debug("TestVisualRecognition", "imageID: {0} | created: {1} | image_file: {2} | metadata: {3}", image.image_id, image.created, image.image_file, image.metadata); + } + else + { + Log.Debug("TestVisualRecognition", "GetImage failed!"); + } + Test(image != null); } private void OnDeleteMetadata(bool success, string customData) { + if (success) + Log.Debug("TestVisualRecognition", "Delete image metadata succeeded!"); + else + Log.Debug("TestVisualRecognition", "Delete image metadata failed!"); - } + Test(success); + } private void OnGetMetadata(object responseObject, string customData) { - Log.Debug("TestVisualRecognition", "ResponseObject: {0}", responseObject); + if(responseObject != null) + Log.Debug("TestVisualRecognition", "ResponseObject: {0}", responseObject); + + Test(responseObject != null); } private void OnFindSimilar(SimilarImagesConfig images, string customData) { + if(images != null) + { + Log.Debug("TestVisualRecognition", "GetSimilar succeeded!"); + Log.Debug("TestVisualRecognition", "images processed: {0}", images.images_processed); + foreach (SimilarImageConfig image in images.similar_images) + Log.Debug("TestVisualRecognition", "image ID: {0} | image file: {1} | score: {2} | metadata: {3}", image.image_id, image.image_file, image.score, image.metadata.ToString()); + } + else + { + Log.Debug("TestVisualRecognition", "GetSimilar failed!"); + } + Test(images != null); } } } From 5773aee93e5a1af537a814f370fc9af93eea644b Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Thu, 15 Sep 2016 22:33:43 -0500 Subject: [PATCH 38/43] complete integration tests --- .../VisualRecognition/VisualRecognition.cs | 40 +-- Scripts/UnitTests/TestVisualRecognition.cs | 227 +++++++++--------- 2 files changed, 142 insertions(+), 125 deletions(-) diff --git a/Scripts/Services/VisualRecognition/VisualRecognition.cs b/Scripts/Services/VisualRecognition/VisualRecognition.cs index e9693d605..50f82b643 100755 --- a/Scripts/Services/VisualRecognition/VisualRecognition.cs +++ b/Scripts/Services/VisualRecognition/VisualRecognition.cs @@ -1271,7 +1271,7 @@ public bool CreateCollection(OnCreateCollection callback, string name, string cu req.Parameters["version"] = VisualRecognitionVersion.Version; req.Forms = new Dictionary(); req.Forms["name"] = new RESTConnector.Form(name); - req.Forms["disregard"] = new RESTConnector.Form("empty"); + req.Forms["disregard"] = new RESTConnector.Form(new byte[4]); req.Timeout = 20.0f * 60.0f; req.OnResponse = OnCreateCollectionResp; @@ -1581,7 +1581,7 @@ public bool AddCollectionImage(OnAddCollectionImage callback, string collectionI Log.Error("VisualRecognition", "Failed to upload {0}!", imagePath); } - return AddCollectionImage(callback, collectionID, imageData, GetMetadataJson(metadata), customData); + return AddCollectionImage(callback, collectionID, imageData, Path.GetFileName(imagePath), GetMetadataJson(metadata), customData); } /// @@ -1633,7 +1633,7 @@ public bool AddCollectionImage(OnAddCollectionImage callback, string collectionI Log.Error("VisualRecognition", "Failed to read {0}!", imagePath); } - return AddCollectionImage(callback, collectionID, imageData, metadata, customData); + return AddCollectionImage(callback, collectionID, imageData, Path.GetFileName(imagePath), metadata, customData); } /// @@ -1645,7 +1645,7 @@ public bool AddCollectionImage(OnAddCollectionImage callback, string collectionI /// Optional json metadata associated with the specified image. /// Optional custom data. /// - public bool AddCollectionImage(OnAddCollectionImage callback, string collectionID, byte[] imageData, string metadata = null, string customData = null) + public bool AddCollectionImage(OnAddCollectionImage callback, string collectionID, byte[] imageData, string filename, string metadata = null, string customData = null) { if (callback == null) throw new ArgumentNullException("callback"); @@ -1672,14 +1672,14 @@ public bool AddCollectionImage(OnAddCollectionImage callback, string collectionI req.Parameters["api_key"] = mp_ApiKey; req.Parameters["version"] = VisualRecognitionVersion.Version; req.Forms = new Dictionary(); - req.Forms["image_file"] = new RESTConnector.Form(imageData); - req.Forms["metadata"] = new RESTConnector.Form(metadata); + req.Forms["image_file"] = new RESTConnector.Form(imageData, filename, GetMimeType(filename)); + req.Forms["metadata"] = new RESTConnector.Form(Encoding.UTF8.GetBytes(metadata), "application/json"); req.Timeout = 20.0f * 60.0f; req.OnResponse = OnAddCollectionImageResp; return connector.Send(req); - } + } private class AddCollectionImageReq : RESTConnector.Request { @@ -2035,8 +2035,8 @@ private void OnGetCollectionImageMetadataResp(RESTConnector.Request req, RESTCon } } - if (((GetCollectionImageReq)req).Callback != null) - ((GetCollectionImageReq)req).Callback(resp.Success ? image : null, ((GetCollectionImageReq)req).Data); + if (((GetCollectionImageMetadataReq)req).Callback != null) + ((GetCollectionImageMetadataReq)req).Callback(resp.Success ? image : null, ((GetCollectionImageMetadataReq)req).Data); } #endregion @@ -2211,12 +2211,22 @@ private string GetMetadataJson(Dictionary metadata) string json = "{"; string metadataItem = "\n\t\"{0}\":\"{1}\""; - foreach(KeyValuePair kv in metadata) - { - json += string.Format(metadataItem, kv.Key, kv.Value); - } - - json += "\n}"; + int i = 0; + foreach (KeyValuePair kv in metadata) + { + i++; + string comma = i < metadata.Count ? "," : ""; + json += string.Format(metadataItem, kv.Key, kv.Value) + comma; + } + + //for(int i = 0; i < metadata.Count; i++) + //{ + // KeyValuePair kv = metadata.; + // string comma = i < metadata.Count - 1 ? "," : ""; + // json += string.Format(metadataItem, kv.Key, kv.Value) + comma; + //} + + json += "\n}"; return json; } diff --git a/Scripts/UnitTests/TestVisualRecognition.cs b/Scripts/UnitTests/TestVisualRecognition.cs index 9c987f177..864edf964 100755 --- a/Scripts/UnitTests/TestVisualRecognition.cs +++ b/Scripts/UnitTests/TestVisualRecognition.cs @@ -74,114 +74,114 @@ public class TestVisualRecognition : UnitTest public override IEnumerator RunTest() { - // test get classifiers - Log.Debug("TestVisualRecognition", "Getting all classifiers!"); - m_VisualRecognition.GetClassifiers(OnGetClassifiers); - while (!m_GetClassifiersTested) - yield return null; - - // test find classifier - Log.Debug("TestVisualRecognition", "Finding classifier {0}!", m_ClassifierName); - m_VisualRecognition.FindClassifier(OnFindClassifier, m_ClassifierName); - while (!m_FindClassifierTested) - yield return null; - - if (m_TrainClassifier) - { - // test train classifier - Log.Debug("TestVisualRecognition", "Training classifier!"); - string m_positiveExamplesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_positive_examples.zip"; - string m_negativeExamplesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/negative_examples.zip"; - Dictionary positiveExamples = new Dictionary(); - positiveExamples.Add(m_ClassName_Giraffe, m_positiveExamplesPath); - Test(m_VisualRecognition.TrainClassifier(OnTrainClassifier, m_ClassifierName, positiveExamples, m_negativeExamplesPath)); - while (!m_TrainClasifierTested) - yield return null; - } - - // Wait until classifier is ready - if (!m_IsClassifierReady) - { - Log.Debug("TestVisualRecognition", "Checking classifier {0} status!", m_ClassifierId); - CheckClassifierStatus(OnCheckClassifierStatus); - while (!m_IsClassifierReady) - yield return null; - } - - if (!string.IsNullOrEmpty(m_ClassifierId)) - { - // test get classifier - Log.Debug("TestVisualRecognition", "Getting classifier {0}!", m_ClassifierId); - m_VisualRecognition.GetClassifier(OnGetClassifier, m_ClassifierId); - while (!m_GetClassifierTested) - yield return null; - - // Update classifier - Log.Debug("TestVisualRecognition", "Updating classifier {0}", m_ClassifierId); - string m_positiveUpdated = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/turtle_positive_examples.zip"; - Dictionary positiveUpdatedExamples = new Dictionary(); - positiveUpdatedExamples.Add(m_ClassName_Turtle, m_positiveUpdated); - m_VisualRecognition.UpdateClassifier(OnUpdateClassifier, m_ClassifierId, m_ClassifierName, positiveUpdatedExamples); - while (!m_UpdateClassifierTested) - yield return null; - - // Wait for updated classifier to be ready. - Log.Debug("TestVisualRecognition", "Checking updated classifier {0} status!", m_ClassifierId); - CheckClassifierStatus(OnCheckUpdatedClassifierStatus); - while (!m_IsUpdatedClassifierReady) - yield return null; - - string[] m_owners = { "IBM", "me" }; - string[] m_classifierIds = { "default", m_ClassifierId }; - - // test classify image get - Log.Debug("TestVisualRecognition", "Classifying image using GET!"); - m_VisualRecognition.Classify(OnClassifyGet, m_ImageURL, m_owners, m_classifierIds); - while (!m_ClassifyGETTested) - yield return null; - - // test classify image post - Log.Debug("TestVisualRecognition", "Classifying image using POST!"); - string m_classifyImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_to_classify.jpg"; - m_VisualRecognition.Classify(m_classifyImagePath, OnClassifyPost, m_owners, m_classifierIds); - while (!m_ClassifyPOSTTested) - yield return null; - } - - // test detect faces get - Log.Debug("TestVisualRecognition", "Detecting face image using GET!"); - m_VisualRecognition.DetectFaces(OnDetectFacesGet, m_ImageFaceURL); - while (!m_DetectFacesGETTested) - yield return null; - - // test detect faces post - Log.Debug("TestVisualRecognition", "Detecting face image using POST!"); - string m_detectFaceImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; - m_VisualRecognition.DetectFaces(m_detectFaceImagePath, OnDetectFacesPost); - while (!m_DetectFacesPOSTTested) - yield return null; - - // test recognize text get - Log.Debug("TestVisualRecognition", "Recognizing text image using GET!"); - m_VisualRecognition.RecognizeText(OnRecognizeTextGet, m_ImageTextURL); - while (!m_RecognizeTextGETTested) - yield return null; + // test get classifiers + Log.Debug("TestVisualRecognition", "Getting all classifiers!"); + m_VisualRecognition.GetClassifiers(OnGetClassifiers); + while (!m_GetClassifiersTested) + yield return null; + + // test find classifier + Log.Debug("TestVisualRecognition", "Finding classifier {0}!", m_ClassifierName); + m_VisualRecognition.FindClassifier(OnFindClassifier, m_ClassifierName); + while (!m_FindClassifierTested) + yield return null; + + if (m_TrainClassifier) + { + // test train classifier + Log.Debug("TestVisualRecognition", "Training classifier!"); + string m_positiveExamplesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_positive_examples.zip"; + string m_negativeExamplesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/negative_examples.zip"; + Dictionary positiveExamples = new Dictionary(); + positiveExamples.Add(m_ClassName_Giraffe, m_positiveExamplesPath); + Test(m_VisualRecognition.TrainClassifier(OnTrainClassifier, m_ClassifierName, positiveExamples, m_negativeExamplesPath)); + while (!m_TrainClasifierTested) + yield return null; + } - // test recognize text post - Log.Debug("TestVisualRecognition", "Recognizing text image using POST!"); - string m_recognizeTextImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/from_platos_apology.png"; - m_VisualRecognition.RecognizeText(m_recognizeTextImagePath, OnRecognizeTextPost); - while (!m_RecognizeTextPOSTTested) - yield return null; + // Wait until classifier is ready + if (!m_IsClassifierReady) + { + Log.Debug("TestVisualRecognition", "Checking classifier {0} status!", m_ClassifierId); + CheckClassifierStatus(OnCheckClassifierStatus); + while (!m_IsClassifierReady) + yield return null; + } - // test delete classifier - Log.Debug("TestVisualRecognition", "Deleting classifier {0}!", m_ClassifierId); - m_VisualRecognition.DeleteClassifier(OnDeleteClassifier, m_ClassifierId); - while (!m_DeleteClassifierTested) - yield return null; + if (!string.IsNullOrEmpty(m_ClassifierId)) + { + // test get classifier + Log.Debug("TestVisualRecognition", "Getting classifier {0}!", m_ClassifierId); + m_VisualRecognition.GetClassifier(OnGetClassifier, m_ClassifierId); + while (!m_GetClassifierTested) + yield return null; + + // Update classifier + Log.Debug("TestVisualRecognition", "Updating classifier {0}", m_ClassifierId); + string m_positiveUpdated = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/turtle_positive_examples.zip"; + Dictionary positiveUpdatedExamples = new Dictionary(); + positiveUpdatedExamples.Add(m_ClassName_Turtle, m_positiveUpdated); + m_VisualRecognition.UpdateClassifier(OnUpdateClassifier, m_ClassifierId, m_ClassifierName, positiveUpdatedExamples); + while (!m_UpdateClassifierTested) + yield return null; + + // Wait for updated classifier to be ready. + Log.Debug("TestVisualRecognition", "Checking updated classifier {0} status!", m_ClassifierId); + CheckClassifierStatus(OnCheckUpdatedClassifierStatus); + while (!m_IsUpdatedClassifierReady) + yield return null; + + string[] m_owners = { "IBM", "me" }; + string[] m_classifierIds = { "default", m_ClassifierId }; + + // test classify image get + Log.Debug("TestVisualRecognition", "Classifying image using GET!"); + m_VisualRecognition.Classify(OnClassifyGet, m_ImageURL, m_owners, m_classifierIds); + while (!m_ClassifyGETTested) + yield return null; + + // test classify image post + Log.Debug("TestVisualRecognition", "Classifying image using POST!"); + string m_classifyImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_to_classify.jpg"; + m_VisualRecognition.Classify(m_classifyImagePath, OnClassifyPost, m_owners, m_classifierIds); + while (!m_ClassifyPOSTTested) + yield return null; + } - // test list collections - Log.Debug("TestVisualRecognition", "Attempting to list collections!"); + // test detect faces get + Log.Debug("TestVisualRecognition", "Detecting face image using GET!"); + m_VisualRecognition.DetectFaces(OnDetectFacesGet, m_ImageFaceURL); + while (!m_DetectFacesGETTested) + yield return null; + + // test detect faces post + Log.Debug("TestVisualRecognition", "Detecting face image using POST!"); + string m_detectFaceImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/obama.jpg"; + m_VisualRecognition.DetectFaces(m_detectFaceImagePath, OnDetectFacesPost); + while (!m_DetectFacesPOSTTested) + yield return null; + + // test recognize text get + Log.Debug("TestVisualRecognition", "Recognizing text image using GET!"); + m_VisualRecognition.RecognizeText(OnRecognizeTextGet, m_ImageTextURL); + while (!m_RecognizeTextGETTested) + yield return null; + + // test recognize text post + Log.Debug("TestVisualRecognition", "Recognizing text image using POST!"); + string m_recognizeTextImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/from_platos_apology.png"; + m_VisualRecognition.RecognizeText(m_recognizeTextImagePath, OnRecognizeTextPost); + while (!m_RecognizeTextPOSTTested) + yield return null; + + // test delete classifier + Log.Debug("TestVisualRecognition", "Deleting classifier {0}!", m_ClassifierId); + m_VisualRecognition.DeleteClassifier(OnDeleteClassifier, m_ClassifierId); + while (!m_DeleteClassifierTested) + yield return null; + + // test list collections + Log.Debug("TestVisualRecognition", "Attempting to list collections!"); m_VisualRecognition.GetCollections(OnGetCollections); while (!m_ListCollectionsTested) yield return null; @@ -211,7 +211,7 @@ public override IEnumerator RunTest() // test list images Log.Debug("TestVisualRecognition", "Attempting to list images!"); - m_VisualRecognition.GetCollections(OnGetCollections); + m_VisualRecognition.GetCollectionImages(OnGetCollectionImages, m_CreatedCollectionID); while (!m_ListImagesTested) yield return null; @@ -632,7 +632,7 @@ private void OnGetCollection(CreateCollection collection, string customData) Test(collection != null); } - private void OnGetCollections(GetCollectionImages collections, string customData) + private void OnGetCollectionImages(GetCollectionImages collections, string customData) { if(collections != null) { @@ -645,8 +645,8 @@ private void OnGetCollections(GetCollectionImages collections, string customData Log.Debug("TestVisualRecognition", "Get Collections failed!"); } - m_ListCollectionsTested = true; Test(collections != null); + m_ListImagesTested = true; } private void OnAddImageToCollection(CollectionsConfig images, string customData) @@ -665,6 +665,7 @@ private void OnAddImageToCollection(CollectionsConfig images, string customData) } Test(images != null); + m_AddImagesToCollectionTested = true; } private void OnDeleteCollectionImage(bool success, string customData) @@ -675,6 +676,7 @@ private void OnDeleteCollectionImage(bool success, string customData) Log.Debug("TestVisualRecognition", "Delete collection image failed!"); Test(success); + m_DeleteImageFromCollectionTested = true; } private void OnGetImage(GetCollectionsBrief image, string customData) @@ -690,7 +692,9 @@ private void OnGetImage(GetCollectionsBrief image, string customData) } Test(image != null); - } + m_ListImageDetailsTested = true; + + } private void OnDeleteMetadata(bool success, string customData) { @@ -700,6 +704,7 @@ private void OnDeleteMetadata(bool success, string customData) Log.Debug("TestVisualRecognition", "Delete image metadata failed!"); Test(success); + m_DeleteImageMetadataTested = true; } private void OnGetMetadata(object responseObject, string customData) @@ -708,7 +713,8 @@ private void OnGetMetadata(object responseObject, string customData) Log.Debug("TestVisualRecognition", "ResponseObject: {0}", responseObject); Test(responseObject != null); - } + m_ListImageMetadataTested = true; + } private void OnFindSimilar(SimilarImagesConfig images, string customData) { @@ -725,6 +731,7 @@ private void OnFindSimilar(SimilarImagesConfig images, string customData) } Test(images != null); + m_FindSimilarTested = true; } } } From d7356d8dc61989856f0bdbd89c55244cbd0e4f78 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Tue, 20 Sep 2016 12:26:26 -0500 Subject: [PATCH 39/43] Fixing issue with error on sending message with conversation ID and empty system node --- .../Scripts/ExampleConversation.cs | 17 ++++++++++++++++- Examples/ServiceExamples/ServiceExamples.unity | 4 ++-- Scripts/Services/Conversation/Conversation.cs | 13 ++----------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Examples/ServiceExamples/Scripts/ExampleConversation.cs b/Examples/ServiceExamples/Scripts/ExampleConversation.cs index e5f34b8d7..20ea94255 100755 --- a/Examples/ServiceExamples/Scripts/ExampleConversation.cs +++ b/Examples/ServiceExamples/Scripts/ExampleConversation.cs @@ -20,12 +20,14 @@ using IBM.Watson.DeveloperCloud.Services.Conversation.v1; using IBM.Watson.DeveloperCloud.Utilities; using IBM.Watson.DeveloperCloud.Logging; +using System; public class ExampleConversation : MonoBehaviour { private Conversation m_Conversation = new Conversation(); private string m_WorkspaceID; private string m_Input = "Can you unlock the door?"; + private string m_ConversationID; void Start () { LogSystem.InstallDefaultReactors(); @@ -42,7 +44,9 @@ void Start () { // Message by passing input, alternate intents and conversationID m_Conversation.Message(OnMessage, m_WorkspaceID, m_Input, false, null); - } + + Converse("is there traffic today?"); + } void OnMessage (MessageResponse resp, string customData) { @@ -54,10 +58,21 @@ void OnMessage (MessageResponse resp, string customData) if(resp.output != null && resp.output.text.Length > 0) foreach(string txt in resp.output.text) Debug.Log("output: " + txt); + + m_ConversationID = resp.context.conversation_id; + } else { Debug.Log("Failed to invoke Message();"); } } + + private void Converse(string input) + { + if (string.IsNullOrEmpty(input)) + throw new ArgumentNullException("input"); + + m_Conversation.Message(OnMessage, m_WorkspaceID, input, true, m_ConversationID); + } } diff --git a/Examples/ServiceExamples/ServiceExamples.unity b/Examples/ServiceExamples/ServiceExamples.unity index ac74c0a89..ad85f0afb 100755 --- a/Examples/ServiceExamples/ServiceExamples.unity +++ b/Examples/ServiceExamples/ServiceExamples.unity @@ -352,7 +352,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &859102723 MonoBehaviour: m_ObjectHideFlags: 0 @@ -593,7 +593,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1713392458 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Scripts/Services/Conversation/Conversation.cs b/Scripts/Services/Conversation/Conversation.cs index 7e1950875..0303937fc 100755 --- a/Scripts/Services/Conversation/Conversation.cs +++ b/Scripts/Services/Conversation/Conversation.cs @@ -135,29 +135,20 @@ public class Conversation : IWatsonService if (callback == null) throw new ArgumentNullException("callback"); - MessageRequest messageRequest = new MessageRequest(); - messageRequest.inputText = input; - messageRequest.alternate_intents = useAlternateIntents; - if (conversationID != default(string)) - messageRequest.conversationID = conversationID; - RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, SERVICE_MESSAGE); if (connector == null) return false; - fsData data; - sm_Serializer.TrySerialize(messageRequest.GetType(), messageRequest, out data).AssertSuccessWithoutWarnings(); - string reqString = fsJsonPrinter.CompressedJson(data); + string reqJson = "{\"input\":{\"text\":\"" + input + "\"},\"alternate_intents\":" + useAlternateIntents.ToString().ToLower() + ",\"context\":{\"conversation_id\":\"" + conversationID + "\"}}"; MessageReq req = new MessageReq(); req.Callback = callback; - req.MessageRequest = messageRequest; req.Headers["Content-Type"] = "application/json"; req.Headers["Accept"] = "application/json"; req.Parameters["version"] = Version.VERSION; req.Function = "/" + workspaceID + "/message"; req.Data = customData; - req.Send = Encoding.UTF8.GetBytes(reqString); + req.Send = Encoding.UTF8.GetBytes(reqJson); req.OnResponse = MessageResp; return connector.Send(req); From 9e1155ae34dfae8c0895c0f0ea4b69875f307ee6 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Fri, 23 Sep 2016 12:09:14 -0500 Subject: [PATCH 40/43] removing overload message with only conversationID, helper methods in data model to create objects, rewirte ExampleConversation as loop to ensure conversation is iterating --- .../Scripts/ExampleConversation.cs | 82 ++++++++++--------- Scripts/Services/Conversation/Conversation.cs | 27 ------ Scripts/Services/Conversation/DataModels.cs | 77 ++++++++++++++++- Scripts/UnitTests/TestConversation.cs | 27 +----- 4 files changed, 120 insertions(+), 93 deletions(-) diff --git a/Examples/ServiceExamples/Scripts/ExampleConversation.cs b/Examples/ServiceExamples/Scripts/ExampleConversation.cs index 20ea94255..d6c0543dc 100755 --- a/Examples/ServiceExamples/Scripts/ExampleConversation.cs +++ b/Examples/ServiceExamples/Scripts/ExampleConversation.cs @@ -16,7 +16,6 @@ */ using UnityEngine; -using System.Collections; using IBM.Watson.DeveloperCloud.Services.Conversation.v1; using IBM.Watson.DeveloperCloud.Utilities; using IBM.Watson.DeveloperCloud.Logging; @@ -26,53 +25,60 @@ public class ExampleConversation : MonoBehaviour { private Conversation m_Conversation = new Conversation(); private string m_WorkspaceID; - private string m_Input = "Can you unlock the door?"; - private string m_ConversationID; + private string m_ConversationID; + private bool m_UseAlternateIntents = true; + private string[] questionArray = { "can you turn up the AC", "can you turn on the wipers", "can you turn off the wipers", "can you turn down the ac", "can you unlock the door"}; void Start () { LogSystem.InstallDefaultReactors(); m_WorkspaceID = Config.Instance.GetVariableValue("ConversationV1_ID"); - Debug.Log("User: " + m_Input); - // Message with input only - //m_Conversation.Message(OnMessage, m_WorkspaceID, m_Input); - - // Message by creating message request - //MessageRequest messageRequest = new MessageRequest(); - //messageRequest.inputText = m_Input; - //m_Conversation.Message(OnMessage, m_WorkspaceID, messageRequest); - - // Message by passing input, alternate intents and conversationID - m_Conversation.Message(OnMessage, m_WorkspaceID, m_Input, false, null); - - Converse("is there traffic today?"); + Debug.Log("**********User: Hello!"); + MessageWithOnlyInput("Hello!"); } - void OnMessage (MessageResponse resp, string customData) + private void MessageWithOnlyInput(string input) { - if(resp != null) - { - foreach(Intent mi in resp.intents) - Debug.Log("intent: " + mi.intent + ", confidence: " + mi.confidence); - - if(resp.output != null && resp.output.text.Length > 0) - foreach(string txt in resp.output.text) - Debug.Log("output: " + txt); + if (string.IsNullOrEmpty(input)) + throw new ArgumentNullException("input"); - m_ConversationID = resp.context.conversation_id; - - } - else - { - Debug.Log("Failed to invoke Message();"); - } + m_Conversation.Message(OnMessageWithOnlyInput, m_WorkspaceID, input); } + + + private void OnMessageWithOnlyInput(MessageResponse resp, string customData) + { + if (resp != null) + { + foreach (Intent mi in resp.intents) + Debug.Log("intent: " + mi.intent + ", confidence: " + mi.confidence); - private void Converse(string input) - { - if (string.IsNullOrEmpty(input)) - throw new ArgumentNullException("input"); + if (resp.output != null && resp.output.text.Length > 0) + foreach (string txt in resp.output.text) + Debug.Log("output: " + txt); - m_Conversation.Message(OnMessage, m_WorkspaceID, input, true, m_ConversationID); - } + m_ConversationID = resp.context.conversation_id; + + string questionStr = questionArray[UnityEngine.Random.Range(0, questionArray.Length - 1)]; + Debug.Log(string.Format("**********User: {0}", questionStr)); + + MessageRequest messageRequest = new MessageRequest(); + messageRequest.InputText = questionStr; + messageRequest.alternate_intents = m_UseAlternateIntents; + messageRequest.ContextData = resp.context; + + MessageWithFullMessageRequest(messageRequest); + } + else + { + Debug.Log("Failed to invoke Message();"); + } + } + + private void MessageWithFullMessageRequest(MessageRequest messageRequest) + { + if (messageRequest == null) + throw new ArgumentNullException("messageRequest"); + m_Conversation.Message(OnMessageWithOnlyInput, m_WorkspaceID, messageRequest); + } } diff --git a/Scripts/Services/Conversation/Conversation.cs b/Scripts/Services/Conversation/Conversation.cs index 0303937fc..29dc833c0 100755 --- a/Scripts/Services/Conversation/Conversation.cs +++ b/Scripts/Services/Conversation/Conversation.cs @@ -126,33 +126,6 @@ public class Conversation : IWatsonService return connector.Send(req); } - public bool Message(OnMessage callback, string workspaceID, string input, bool useAlternateIntents, string conversationID = default(string), string customData = default(string)) - { - if (string.IsNullOrEmpty(workspaceID)) - throw new ArgumentNullException("workspaceId"); - if (string.IsNullOrEmpty(input)) - throw new ArgumentNullException("input"); - if (callback == null) - throw new ArgumentNullException("callback"); - - RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, SERVICE_MESSAGE); - if (connector == null) - return false; - - string reqJson = "{\"input\":{\"text\":\"" + input + "\"},\"alternate_intents\":" + useAlternateIntents.ToString().ToLower() + ",\"context\":{\"conversation_id\":\"" + conversationID + "\"}}"; - - MessageReq req = new MessageReq(); - req.Callback = callback; - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - req.Parameters["version"] = Version.VERSION; - req.Function = "/" + workspaceID + "/message"; - req.Data = customData; - req.Send = Encoding.UTF8.GetBytes(reqJson); - req.OnResponse = MessageResp; - - return connector.Send(req); - } private class MessageReq : RESTConnector.Request { diff --git a/Scripts/Services/Conversation/DataModels.cs b/Scripts/Services/Conversation/DataModels.cs index 81152e08e..3124de7be 100755 --- a/Scripts/Services/Conversation/DataModels.cs +++ b/Scripts/Services/Conversation/DataModels.cs @@ -127,6 +127,15 @@ public class LogMessageResponse [fsObject] public class MessageRequest { + ///// + ///// Default constructor. + ///// + //public MessageRequest() + //{ + // input = new InputData(); + // context = new Context(); + //} + /// /// The input text. /// @@ -143,9 +152,19 @@ public class MessageRequest /// /// Creates the input object and sets the InputText. /// - public string inputText + public string InputText { - get { return input != null ? input.text : null; } + get { + if (input == null) + { + input = new InputData(); + return ""; + } + else + { + return input.text; + } + } set { if (input == null) @@ -155,6 +174,21 @@ public string inputText } } + /// + /// Gets and sets the input value and creates the InputData object if it hasn't been created. + /// + public InputData InputData + { + get { return input != null ? input : input = new InputData(); } + set + { + if (input == null) + input = new InputData(); + + input = value; + } + } + /// /// Creates the Context object and sets the conversation_id. /// @@ -169,6 +203,21 @@ public string conversationID context.conversation_id = value; } } + + /// + /// Gets and sets the context value and creates the Context object if it hasn't been created. + /// + public Context ContextData + { + get { return context != null ? context : context = new Context(); } + set + { + if (context == null) + context = new Context(); + + context = value; + } + } } #endregion @@ -191,6 +240,13 @@ public class InputData [fsObject] public class Context { + ///// + ///// Default constructor. + ///// + //public Context() + //{ + // system = new SystemResponse(); + //} /// /// The unique identifier of the conversation. /// @@ -199,7 +255,22 @@ public class Context /// Information about the dialog /// public SystemResponse system { get; set; } - } + + /// + /// Creates the SystemResponse object and sets it. + /// + public SystemResponse SystemResponse + { + get { return system != null ? system : system = new SystemResponse(); } + set + { + if (system == null) + system = new SystemResponse(); + + system = value; + } + } + } /// /// Dialog information. diff --git a/Scripts/UnitTests/TestConversation.cs b/Scripts/UnitTests/TestConversation.cs index ca5b09d79..ff07a51ab 100755 --- a/Scripts/UnitTests/TestConversation.cs +++ b/Scripts/UnitTests/TestConversation.cs @@ -29,7 +29,6 @@ public class TestConversation : UnitTest private string m_Input = "Can you unlock the door?"; private bool m_MessageInputTested = false; private bool m_MessageObjectTested = false; - private bool m_MessageTested = false; public override IEnumerator RunTest() { @@ -48,19 +47,12 @@ public override IEnumerator RunTest() if (!m_MessageObjectTested) { MessageRequest messageRequest = new MessageRequest(); - messageRequest.inputText = m_Input; + messageRequest.InputText = m_Input; m_Conversation.Message(OnMessageObject, m_WorkspaceID, messageRequest); while (!m_MessageObjectTested) yield return null; } - - if (!m_MessageTested) - { - m_Conversation.Message(OnMessage, m_WorkspaceID, m_Input, false); - while (!m_MessageTested) - yield return null; - } - + yield break; } @@ -93,19 +85,4 @@ private void OnMessageObject(MessageResponse resp, string customData) m_MessageObjectTested = true; } - - private void OnMessage(MessageResponse resp, string customData) - { - Test(resp != null); - if (resp != null) - { - foreach (Intent mi in resp.intents) - Log.Debug("TestConversation", "intent: " + mi.intent + ", confidence: " + mi.confidence); - if (resp.output != null && resp.output.text.Length > 0) - foreach (string txt in resp.output.text) - Debug.Log("output: " + txt); - } - - m_MessageTested = true; - } } From c6c2a50e9a771a005c114a03ab830bd50959c160 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Fri, 23 Sep 2016 13:21:01 -0500 Subject: [PATCH 41/43] Updated changelog and readme to include similarity search documentation --- CHANGELOG.md | 9 ++ README.md | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 254 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7b40bae1..00d3293b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ Change Log ========== +## Version 0.10.0 +_2016_09_23_ + +* New: Added `similarity search` to the `Visual Recognition` service. +* Fix: `Touch Widget` improvmements. +* Fix: Disabled 3rd Party plugin warnings. +* Fix: Removed `Conversation` Message overload method that takes only input and conversationID. +* Fix: Rewrote `Conversation` example script to show how to create MessageRequest object. + ## Version 0.9.0 _2016-08-26_ diff --git a/README.md b/README.md index 5b8d79635..4b418dd80 100644 --- a/README.md +++ b/README.md @@ -729,6 +729,251 @@ private void OnRecognizeText(TextRecogTopLevelMultiple multipleImages) } ``` +#### Similarity Search +Beta. You can create and add images to a collection and then search that collection with your own image to find similar images. + +##### List Collections +Beta. List all custom collections. + +```cs +void Start() +{ + m_VisualRecognition.GetCollections(OnGetCollections); +} + +private void OnGetCollections(GetCollections collections, string customData) +{ + if(collections != null) + { + foreach (CreateCollection collection in collections.collections) + { + Log.Debug("VisualRecognitionExample", "collectionID: {0} | collection name: {1} | number of images: {2}", collection.collection_id, collection.name, collection.images); + } + } + else + { + Log.Debug("VisualRecognitionExample", "Get Collections failed!"); + } +} +``` + +##### Create Collection +Beta. Create a new collection of images to search. You can create a maximum of 5 collections. + +```cs +void Start() +{ + m_VisualRecognition.CreateCollection(OnCreateCollection, "unity-integration-test-collection"); +} + +private void OnCreateCollection(CreateCollection collection, string customData) +{ + if(collection != null) + { + Log.Debug("VisualRecognitionExample", "Create Collection succeeded!"); + Log.Debug("VisualRecognitionExample", "collectionID: {0} | collection name: {1} | collection images: {2}", collection.collection_id, collection.name, collection.images); + } + else + { + Log.Debug("VisualRecognitionExample", "Create Collection failed!"); + } +} +``` + +##### Get collection details +Beta. Retrieve information about a specific collection. + +```cs +void Start() +{ + m_VisualRecognition.GetCollection(OnGetCollection, m_CreatedCollectionID); +} + +private void OnGetCollection(CreateCollection collection, string customData) +{ + if (collection != null) + { + Log.Debug("VisualRecognitionExample", "Get Collection succeded!"); + Log.Debug("VisualRecognitionExample", "collectionID: {0} | collection name: {1} | collection images: {2}", collection.collection_id, collection.name, collection.images); + } + else + { + Log.Debug("VisualRecognitionExample", "Get Collection failed!"); + + } +} +``` + +##### Add images to a collection +Beta. Add images to a collection. Each collection can contain 1000000 images. + +```cs +void Start() +{ + string m_collectionImagePath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_to_classify.jpg"; + Dictionary imageMetadata = new Dictionary(); + imageMetadata.Add("key1", "value1"); + imageMetadata.Add("key2", "value2"); + imageMetadata.Add("key3", "value3"); + m_VisualRecognition.AddCollectionImage(OnAddImageToCollection, m_CreatedCollectionID, m_collectionImagePath, imageMetadata); +} +private void OnAddImageToCollection(CollectionsConfig images, string customData) +{ + if(images != null) + { + Log.Debug("VisualRecognitionExample", "Add image to collection succeeded!"); + m_CreatedCollectionImage = images.images[0].image_id; + Log.Debug("VisualRecognitionExample", "images processed: {0}", images.images_processed); + foreach (CollectionImagesConfig image in images.images) + Log.Debug("VisualRecognitionExample", "imageID: {0} | image_file: {1} | image metadata: {1}", image.image_id, image.image_file, image.metadata.ToString()); + } + else + { + Log.Debug("VisualRecognitionExample", "Add image to collection failed!"); + } +} +``` + +##### List images in a collection +Beta. List the first 100 images in a collection. Each collection can contain 1000000 images. + +```cs +void Start() +{ + m_VisualRecognition.GetCollectionImages(OnGetCollectionImages, m_CreatedCollectionID); +} + +private void OnGetCollectionImages(GetCollectionImages collections, string customData) +{ + if(collections != null) + { + Log.Debug("VisualRecognitionExample", "Get Collections succeded!"); + foreach(GetCollectionsBrief collection in collections.images) + Log.Debug("VisualRecognitionExample", "imageID: {0} | image file: {1} | image metadataOnGetCollections: {2}", collection.image_id, collection.image_file, collection.metadata.ToString()); + } + else + { + Log.Debug("VisualRecognitionExample", "Get Collections failed!"); + } +} +``` + +##### List image details +Beta. List details about a specific image in a collection. +```cs +void Start() +{ + m_VisualRecognition.GetImage(OnGetImage, m_CreatedCollectionID, m_CreatedCollectionImage); +} + +private void OnGetImage(GetCollectionsBrief image, string customData) +{ + if(image != null) + { + Log.Debug("VisualRecognitionExample", "GetImage succeeded!"); + Log.Debug("VisualRecognitionExample", "imageID: {0} | created: {1} | image_file: {2} | metadata: {3}", image.image_id, image.created, image.image_file, image.metadata); + } + else + { + Log.Debug("VisualRecognitionExample", "GetImage failed!"); + } +} +``` + +##### List image metadata +Beta. View the metadata for a specific image in a collection. + +```cs +void Start() +{ + m_VisualRecognition.GetMetadata(OnGetMetadata, m_CreatedCollectionID, m_CreatedCollectionImage); +} + +private void OnGetMetadata(object responseObject, string customData) +{ + if(responseObject != null) + Log.Debug("VisualRecognitionExample", "ResponseObject: {0}", responseObject); +} +``` + +##### Find similar images +Beta. Upload an image to find similar images in your custom collection. + +```cs +void Start() +{ + m_VisualRecognition.FindSimilar(OnFindSimilar, m_CreatedCollectionID, m_collectionImagePath); +} + +private void OnFindSimilar(SimilarImagesConfig images, string customData) +{ + if(images != null) + { + Log.Debug("VisualRecognitionExample", "GetSimilar succeeded!"); + Log.Debug("VisualRecognitionExample", "images processed: {0}", images.images_processed); + foreach (SimilarImageConfig image in images.similar_images) + Log.Debug("VisualRecognitionExample", "image ID: {0} | image file: {1} | score: {2} | metadata: {3}", image.image_id, image.image_file, image.score, image.metadata.ToString()); + } + else + { + Log.Debug("VisualRecognitionExample", "GetSimilar failed!"); + } +} +``` + +##### Delete image metadata +Beta. Delete all metadata associated with an image. + +```cs +void Start() +{ + m_VisualRecognition.DeleteCollectionImageMetadata(OnDeleteMetadata, m_CreatedCollectionID, m_CreatedCollectionImage); +} + +private void OnDeleteMetadata(bool success, string customData) +{ + if (success) + Log.Debug("VisualRecognitionExample", "Delete image metadata succeeded!"); + else + Log.Debug("VisualRecognitionExample", "Delete image metadata failed!"); +} +``` + +##### Delete an image +Beta. Delete an image from a collection. + +```cs +void Start() +{ + m_VisualRecognition.DeleteCollectionImage(OnDeleteCollectionImage, m_CreatedCollectionID, m_CreatedCollectionImage); +} + +private void OnDeleteCollectionImage(bool success, string customData) +{ + if (success) + Log.Debug("VisualRecognitionExample", "Delete collection image succeeded!"); + else + Log.Debug("VisualRecognitionExample", "Delete collection image failed!"); +} +``` + +##### Delete a collection +Beta. Delete a user created collection. + +```cs +void Start() +{ + m_VisualRecognition.DeleteCollection(OnDeleteCollection, m_CreatedCollectionID); +} + +private void OnDeleteCollection(bool success, string customData) +{ + if(success) + Log.Debug("VisualRecognitionExample", "Delete Collection succeeded!"); + else + Log.Debug("VisualRecognitionExample", "Delete Collection failed!"); +} +``` ### Alchemy Language Use the [Alchemy Language][alchemy_language] service to extract semantic meta-data from content such as information on people, places, companies, topics, facts, relationships, authors and languages. From bae0588b77d719197b5dd08052775f6b6c0894d5 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Fri, 23 Sep 2016 13:48:46 -0500 Subject: [PATCH 42/43] updated user-agent --- Scripts/Utilities/Constants.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Utilities/Constants.cs b/Scripts/Utilities/Constants.cs index 56149ea1d..8b0d22ac8 100755 --- a/Scripts/Utilities/Constants.cs +++ b/Scripts/Utilities/Constants.cs @@ -66,7 +66,7 @@ public static class Resources public static class String { /// - public const string VERSION = "watson-developer-cloud-unity-sdk-0.9.0"; + public const string VERSION = "watson-developer-cloud-unity-sdk-0.10.0"; /// public const string DEBUG_DISPLAY_QUALITY = "Quality: {0}"; } From 7187d1ddd850f0eb411d2006335e8db9d77ebd05 Mon Sep 17 00:00:00 2001 From: Ajiemar Santiago Date: Fri, 23 Sep 2016 14:08:11 -0500 Subject: [PATCH 43/43] revise error text when no customizationID for STT is found --- Scripts/Services/TextToSpeech/TextToSpeech.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Services/TextToSpeech/TextToSpeech.cs b/Scripts/Services/TextToSpeech/TextToSpeech.cs index ba6a51380..d86f6c392 100755 --- a/Scripts/Services/TextToSpeech/TextToSpeech.cs +++ b/Scripts/Services/TextToSpeech/TextToSpeech.cs @@ -660,7 +660,7 @@ private void OnDeleteCustomizationResp(RESTConnector.Request req, RESTConnector. if (callback == null) throw new ArgumentNullException("callback"); if (string.IsNullOrEmpty(customizationID)) - throw new ArgumentNullException("A name is customizationID to get a custom voice model."); + throw new ArgumentNullException("A customizationID to get a custom voice model."); GetCustomizationRequest req = new GetCustomizationRequest(); req.Callback = callback;