hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.14k stars 394 forks source link

[bug report] Face tracking not working properly on any Android browser #316

Closed marcusx2 closed 5 months ago

marcusx2 commented 1 year ago

There is a huge offset of the content that should appear on the face, it's way off. It doesn't work properly on any Android browser. It works just fine on all iPhone browsers though, even Safari and Edge.

Related https://github.com/hiukim/mind-ar-js/issues/268

marcusx2 commented 1 year ago

@hiukim I wonder if this will be fixed? ;_;

hiukim commented 1 year ago

Hi, I can't really replicate this issue on my device. I fixed something related in v1.1.5, but apparently it's not enough.

marcusx2 commented 1 year ago

Can you tell me where the logic for your fix is located, and where the logic for the positioning is? I'll try to play around with it a bit and see if I can fix it myself and make a pull request.

hiukim commented 1 year ago

commits

https://github.com/hiukim/mind-ar-js/commit/ab4078203c42cdc7a9a10a9941824fac00dc8ff0

https://github.com/hiukim/mind-ar-js/commit/4cd09e9ce6cd54be216cca60cdcc303316b80e77

realmigan commented 1 year ago

I try different Android phones and it doesn't work properly on any Android browser.

hiukim commented 1 year ago

Can do screen recordings?

marcusx2 commented 1 year ago

@hiukim where do you live? I can send you an android phone man xD

hiukim commented 1 year ago

haha, I'm using pixel 5 myself, and it looks good. LOL

marcusx2 commented 1 year ago

Oh really? Try an old Samsung S8, which is the phone I'm using.

@realmigan can you tell us what android phones you tried on, just for reference? Let's make a list to make it easy for @hiukim , whichever phone of the list he can get his hands on will suffice.

marcusx2 commented 1 year ago

@hiukim How can I build the project to test the changes? How can I generate the new prod files for testing? Thanks!

hiukim commented 1 year ago

run npm run build

marcusx2 commented 1 year ago

Hey man I just noticed that the fixes don't touch the aframe.js file, only the three.js one. Maybe that's the issue? You only applied the fix to the threejs version?

I've been trying to fix the problem to no avail ;_;

marcusx2 commented 1 year ago

Here you go, a video recording. Hope it helps.

https://user-images.githubusercontent.com/5656275/212409397-30611950-8b81-47ec-a1ab-aac463127c70.mp4

hiukim commented 1 year ago

Maybe I haven't fixed the aframe version. Does threeJS version working fine for you?

marcusx2 commented 1 year ago

Yes man...the threejs version works. I can't believe this...it was working the whole time...the threejs version that is...can you fix the aframe version then? Thanks.

hiukim commented 1 year ago

nice. will fix that. thx

hiukim commented 1 year ago

@marcusx2 I finally can replicate this issue. I think this is resolved with the latest aframe version 1.4, e.g.

use

<script src="https://aframe.io/releases/1.4.1/aframe.min.js"></script>

instead of

<script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>

Can you verify?

marcusx2 commented 1 year ago

@hiukim this didn't work. I still have the same problem when trying the virtual try on example. Can you reopen the ticket?

marcusx2 commented 1 year ago

@hiukim if it helps at all, there's this library with webar face tracking using aframe where the issue doesn't happen. The answer to this problem can probably be found on their codebase..

mayhemantt commented 1 year ago

Is there any update regrading this issue? i have tried a few things but doesn't seem to works

hiukim commented 5 months ago

maybe because missing look-controls="enabled: false in the camera entity. the example should have fixed now.

Feel free to re-open the issue if not.

marcusx2 commented 5 months ago

The offset is no longer there, but the models seem to be a lot bigger than they should be. The glasses are way bigger on Android devices.