tag:blogger.com,1999:blog-5295746446529817470.comments2023-05-09T16:29:24.130+02:00Dotnet by ExampleJoost van Schaikhttp://www.blogger.com/profile/02182444268071162776noreply@blogger.comBlogger852125tag:blogger.com,1999:blog-5295746446529817470.post-71201040051296464902020-08-09T21:45:37.933+02:002020-08-09T21:45:37.933+02:00Done. Thank youDone. Thank youJoost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-53353459116168094982020-07-30T17:06:15.586+02:002020-07-30T17:06:15.586+02:00Might want to update your GitHub profile then :DMight want to update your GitHub profile then :DSimon (Darkside) Jacksonhttps://www.blogger.com/profile/11886586409059479949noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-78472054698937882172020-06-26T23:32:02.565+02:002020-06-26T23:32:02.565+02:00Thank you sir :) Did the job 👍Thank you sir :) Did the job 👍Anonymoushttps://www.blogger.com/profile/05950491613454938481noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-13594220819631321622020-04-29T08:11:57.644+02:002020-04-29T08:11:57.644+02:00Hi Cyprien,
Tbh, I am not sure. As you might have ...Hi Cyprien,<br />Tbh, I am not sure. As you might have seen on a previous blog post http://dotnetbyexample.blogspot.com/2019/01/adapting-custom-vision-object.html I have used models created by Custom Vision specifically. They come with an accompanying file, ObjectDetection.cs that basically provides the interface to the model. If you don't have that interface file, you have to write or adapt it yourself. More specifically, you will have to look into this method:<br />public async Task> PredictImageAsync(VideoFrame image)<br />{<br /> var imageFeature = ImageFeatureValue.CreateFromVideoFrame(image);<br /> var bindings = new LearningModelBinding(this.session);<br /> bindings.Bind("data", imageFeature);<br /> var result = await this.session.EvaluateAsync(bindings, "");<br /> return Postprocess(result.Outputs["model_outputs0"] as TensorFloat);<br />}<br />Where the model is "Bound" apparently to an input parameter "data" and returns a TensorFloat "model_outputs0". I have no idea what your model wants and what it outputs.<br /><br />This is where you have to look. What you should exactly do with it, no idea. Without more details about the model I can't help you further than this I am afraid Joost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-15819708051889850232020-04-25T10:58:34.160+02:002020-04-25T10:58:34.160+02:00Dear Joost,
First of all thank you very much for ...Dear Joost,<br /><br />First of all thank you very much for your tutorial that has been done very comprehensive and easy to work with. I noticed that you mentionned that you could answer question on our specific task. So, here it is. I am working on project to enable Hololens to perform Object detection using tiny-yolov3 from darknet. I have found the ONNX model but the versions available are either 1.3 or 1.5. Would it be compatible with your code?<br />Also, if I am using a different model which scripts should I adapt?<br /><br />Hope to hear from you <br />bests <br />CyprienAnonymoushttps://www.blogger.com/profile/03445344778577829134noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-74881474363272787032020-04-06T20:03:52.852+02:002020-04-06T20:03:52.852+02:00Thanks for informing me I had forgotten to actuall...Thanks for informing me I had forgotten to actually add the files to the repo and push them. This has been corrected.<br /><br />Swiping on the NNK would be quite some work. Not sure if you can get the necessary accuracy to make this actually helpful. Swiping with your finger on a glass keyboard is one thing, but moving your whole arm and hand to do some... not sure.Joost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-38674798673138829322020-04-01T15:48:54.824+02:002020-04-01T15:48:54.824+02:00Thanks for this. Seems to be some uncertainty rega...Thanks for this. Seems to be some uncertainty regarding what's the best path forward in MRTK regarding the keyboard as there have been a few issues pointed out with TouchScreenKeyboard and MixedRealityKeyboard - is NonNativeKeyboard going to be the way MRTK recommends going forward? Seems to be recent development in both.<br /><br />I'm also interested in whether you think swiping would be feasible with the NNK - would the inherent latency be too much to make this feasible?<br /><br />FYI seemed like the repo you linked to was still empty but did find this: https://github.com/microsoft/MixedRealityToolkit-Unity/tree/mrtk_development/Assets/MRTK/Examples/Experimental/NonNativeKeyboardTravis Rothbloomhttps://www.blogger.com/profile/11422779828912849953noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-73060474820592104592020-03-25T02:24:13.737+01:002020-03-25T02:24:13.737+01:00Thank you very much, very very very helpfulThank you very much, very very very helpfulAnonymoushttps://www.blogger.com/profile/08278942529983252179noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-11216738688293532842020-02-17T12:58:19.313+01:002020-02-17T12:58:19.313+01:00@Freek is je aandachtsspanne al zover aangetast in...@Freek is je aandachtsspanne al zover aangetast in het swipe-tijdperk dat je dit te lang vondt? :PAnonymoushttps://www.blogger.com/profile/01042775228445296010noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-60195067291171564942020-02-17T05:00:50.461+01:002020-02-17T05:00:50.461+01:00Awesome, love that you got your hands on one... H...Awesome, love that you got your hands on one... Hopefully soon for the rest of us. :) Great article, well done, hopefully see you soon!Lance Larsenhttps://www.blogger.com/profile/03034282689796189207noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-11701358811462923802020-02-15T20:06:34.578+01:002020-02-15T20:06:34.578+01:00Leuk (wel beetje lang) om te lezen Joost. Het doet...Leuk (wel beetje lang) om te lezen Joost. Het doet me goed dat de MS relatie voor jou zo goed uitpakt. Voor mij zou het ‘game changing’ aspect van HL2 pas tot zn recht komen als er ook een ‘game changer’ app komt die er goed gebruik van maakt. Ik vond je opmerkingen over hoe snel mensen verveeld zijn met een speeltje terecht. Dat wordt anders als er een echte consumenten of zakelijke toepassing komt. Dan wordt een nieuwegheidje gewoon nodig. De kans dat HL2 daar de basis van wordt lijkt me aannemelijk. Freek Boersma Srhttps://www.blogger.com/profile/13601441615492459511noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-6862975952445360472020-02-14T12:28:17.509+01:002020-02-14T12:28:17.509+01:00@peSHIr well thank you for still following my ramb...@peSHIr well thank you for still following my ramblings on the internet... good old times may be gone, but not forgotten. Joost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-65548395439906822872020-02-12T20:26:09.728+01:002020-02-12T20:26:09.728+01:00Would like to try one, but probably will never hav...Would like to try one, but probably will never have my hands on HL3+ in a couple of years; the beeldin' edge has left me behind, or at the very least, I have sort of happily left it. And that's okay. Oh well, we'll see...peSHIrhttps://www.blogger.com/profile/14895291650174860198noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-48611453763273921402020-01-10T12:59:24.359+01:002020-01-10T12:59:24.359+01:00I can confirm that it works as that on a physical ...I can confirm that it works as that on a physical HoloLens 2 deviceAnonymoushttps://www.blogger.com/profile/04474955713474293018noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-35576819458459619252019-12-08T06:40:53.611+01:002019-12-08T06:40:53.611+01:00niceniceAlia parkerhttps://www.blogger.com/profile/02326303770549335930noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-74492009486014997362019-11-18T20:01:01.576+01:002019-11-18T20:01:01.576+01:00Joost, this is all very confusing. As I understand...Joost, this is all very confusing. As I understand it after doing a number of tests:<br /><br />- MRTK1, uses json.net .net version 3.5 in its gltf component. This compiles fine and also runs fine on UWP with IL2CPP. That is as long as you <b>DON'T</b> use dynamics, JObject, JArray, basically the Newtonsoft.Json.Linq stuff. This will compile, yet generate Reflection.Emit errors. This is caused by C++ which does not store variable names. <br /><br />- MRTK2, does not compile with json.net version 3.5 according to you. <b>WHY?</b> You downloaded json.net 4.5 and it compiles and runs correctly. But that is still only true if you do not use dynamcis, because it is still translated to C++ with IL2CPP.<br /><br />There should be no difference with the json.net .net 3.5 and .net 4.0 versions other than that you can use more fancy stuff in .net 4.0 version like x.y instead of x["y"] in your code.<br /><br />Basically it should have nothing to do with MRTK1 or MRTK whether you get Reflection.Emit errors. This does depend on whether you are trying to deserialize typed versus untyped json. For typed json you can use any version of json.net, but why then do you not use the build-in Unity json version: JsonUtility.FromJson(jsonstring). This works very good. For untyped json (untyped = you do not know the key values in advance), there is currently no solution for UWP that I know of. The current solutions all use reflection.Emit.<br /><br />So what I am curious is why json.net version 3.5 does not compile with MRKT2. I will investigate this, have to start at some time with HL2 stuff anyway :-) Will let you knowAnonymoushttps://www.blogger.com/profile/09480726690265794576noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-69983993421041361402019-11-18T16:52:20.898+01:002019-11-18T16:52:20.898+01:00@Tom - it will compile fine. That is not the issue...@Tom - it will compile fine. That is not the issue. It will crash <i>run time</i> because apparently it uses Reflection.Emit under the covers and apparently this in not allowed in the generated C++ solution, as I explain in the text. And I have tried to generate a C# deployment solution with the MRTK2 - and could not get that to compile. So I decided to move forward with this versionJoost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-28462596060709525332019-11-14T16:28:04.329+01:002019-11-14T16:28:04.329+01:00Joost, as I understand it, the newtonsoft json.net...Joost, as I understand it, the newtonsoft json.net version in the gltf downloader (the one from the asset store, don't know if this is the same or a little newer version than the version in MRTK1) uses .NET 3.5 and the json.net one you downloaded from the store is the .NET 4.5 version (both adapted for Unity).<br /><br />Since I use extensively the gltf loader, I will stick with the .NET 3.5 version as long as I can. The question I have for you is why the older version will not compile together with MRTK2?<br /><br />Grtz, Tom MensinkAnonymoushttps://www.blogger.com/profile/09480726690265794576noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-63169207900580597512019-11-11T19:29:40.313+01:002019-11-11T19:29:40.313+01:00@DerApe yes - In OnAttached usally not the whole V...@DerApe yes - In OnAttached usally not the whole Visual Tree is available. But TBH, this is a very old post. I am not sure how much is still applicableJoost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-90717388921402799172019-11-07T10:03:25.023+01:002019-11-07T10:03:25.023+01:00Is there any special reason why you would do the a...Is there any special reason why you would do the attaching in the Loaded event and not just stick with the existing OnAttached approach?DerApehttps://www.blogger.com/profile/17310528184121355123noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-19689498913387683122019-09-10T22:42:32.886+02:002019-09-10T22:42:32.886+02:00@kndrzej you are most welcome ;)
@kndrzej you are most welcome ;)<br />Joost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-17762912302024585532019-09-09T09:39:03.618+02:002019-09-09T09:39:03.618+02:00Thank you, it workedThank you, it workedkndrzejhttps://www.blogger.com/profile/13747715104040476430noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-46583931918842833462019-09-06T21:43:07.076+02:002019-09-06T21:43:07.076+02:00Hi,
It's really hard to say what you might ha...Hi, <br />It's really hard to say what you might have done wrong. You are absolutely, positively sure you did all the things I described you should do?<br />* You have installed all the components?<br />* You have ticked all the capabilities?<br />* You have built your app for debug/x86, deployed on you HoloLens and started it?<br /><br />If you are sure this is all correct, the only thing I can think of it your network blocking ports. Try to make a local WiFi network, for instance using by making a WiFi hotspot using the standard Windows 10 capabilities for that.Joost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-25508370330579140952019-09-06T14:16:42.804+02:002019-09-06T14:16:42.804+02:00Great article. However, I can't find HoloLens ...Great article. However, I can't find HoloLens player as debug target to attach at all (in both VS.NET instances). Tried to add the IP address and port manually, doesn't seem to be doing the trick. Anything I need to do? ThanksAnonymoushttps://www.blogger.com/profile/04794584083073448375noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-27193136177148621262019-07-25T19:22:33.134+02:002019-07-25T19:22:33.134+02:00*tips hat* you are welcome!*tips hat* you are welcome!Joost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.com