SharpAI / DeepCamera

Open-Source AI Camera. Empower any camera/CCTV with state-of-the-art AI, including facial recognition, person recognition(RE-ID) car detection, fall detection and more
https://sharpai.github.io/DeepCamera/
MIT License
1.87k stars 317 forks source link

Face images are grey on the browser interface. Looks like API server is presenting image without jpg extension. #70

Closed thartman69 closed 2 years ago

thartman69 commented 2 years ago

Great project! Well done.

I am running the master image on a Ubuntu 18.04 VM. (virtualised with Proxmox PVE) Using a Foscam 720p camera that connects fine via RTSP and I can see a picture. Flower shows that the images are being processed and uploaded to the Minio bucket. Connecting to API server port 3000 I see the activity but only grey boxes where the face pictures should be.

If I download the picture from Minio and rename it to *,jpg I can view the picture and it is a face.

In Flower log I can see ['/opt/nvr/detector/images/deepeye_1647774820586.jpg', 1647774820587, 1647774820587, 'pBrIitBTIr']

Screenshot 2022-03-20 221454

For some reason the API server is not presenting the file with the JPG extension. Is this a known Minio bug, or other?

solderzzc commented 2 years ago

Hi, @thartman69 Thanks for reporting this issue. This application was tested with web kit on Android/IOS, the face images were displayed instead of a grey box, so it may cause by browser compatibility. May I know your browser and if possible, if it's not chrome, could you try to load with chrome?

BTW, are you using the public testing server set by me or docker image running locally?

thartman69 commented 2 years ago

Hi SImba, thanks for responding. I'm using Chrome on a PC and have also tested with other browsers on Mac, PC and IOS. I am using the master docker image locally. As far as I can tell I've configured everything correctly. Face images are popping in the bucket. If I rename a file to jpg or png they are displayed in the browser, so it looks like FFMPEG extracts and encodes the base64 image correctly from my old 720p Foscam for upload into Minio. I've been digging into API Server code to see if it conforms to security settings. There was a suggestion that Chrome had tightened security around files without extensions being presented. Or forcing it in htaccess... I have not given up. :) I will try the public testing server today.

solderzzc commented 2 years ago

Hi, @thartman69 Thanks for digging into this problem, I believe htaccess suggestion was introduced by browser upgrade. Let me also modify code when upload face image to minio to include the extension .jpg, I believe public server also has the same issue since it's the same docker image.

thartman69 commented 2 years ago

That's be awesome. Can't wait to see it all in action.

solderzzc commented 2 years ago

Hi, @thartman69 I'm not able to reduplicate this issue in my setup, my browser is safari version 15.3, I'm able to load image.

I modified the code to upload image with png extension name. If something still wrong, please also send me the browser inspection log.

thartman69 commented 2 years ago

awesome, I'll rebuild it tonight and let you know.

thartman69 commented 2 years ago

Ah, I see you modified the Nano code, I'm using the Master branch because I'm using it in a VM. Should I switch to the Nano branch?

solderzzc commented 2 years ago

Yep, you're right, please switch to nano branch.

On Tue, Mar 29, 2022 at 8:21 PM thartman69 @.***> wrote:

Ah, I see you modified the Nano code, I'm using the Master branch because I'm using it in a VM. Should I switch to the Nano branch?

— Reply to this email directly, view it on GitHub https://github.com/SharpAI/DeepCamera/issues/70#issuecomment-1082580201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXRJ7ASFDC6PQUTLBFUUTTVCPCFHANCNFSM5RFLVL2Q . You are receiving this because you were assigned.Message ID: @.***>

thartman69 commented 2 years ago

Excellent, that's even better because I want to use the Telegram feature. Thank you, Simba!

solderzzc commented 2 years ago

Great, let me know if there’s any issue.

On Tue, Mar 29, 2022 at 8:29 PM thartman69 @.***> wrote:

Excellent, that's even better because I want to use the Telegram feature. Thank you, Simba!

— Reply to this email directly, view it on GitHub https://github.com/SharpAI/DeepCamera/issues/70#issuecomment-1082583780, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXRJ7DFS53A33DVMT7HCWDVCPDCHANCNFSM5RFLVL2Q . You are receiving this because you were assigned.Message ID: @.***>

thartman69 commented 2 years ago

The nano release won't install nicely on a KVM VM, I get errors in Flower showing up and only one thread. I'll see if I can fork the project and apply the nano changes you made to the master release to get it working,

solderzzc commented 2 years ago

The nano branch has optimization for Jetson Nano 4GB board, it won’t run on x86 machine.

On Wed, Mar 30, 2022 at 2:59 PM thartman69 @.***> wrote:

The nano release won't install nicely on a KVM VM, I get errors in Flower showing up and only one thread. I'll see if I can fork the project and apply the nano changes you made to the master release to get it working,

— Reply to this email directly, view it on GitHub https://github.com/SharpAI/DeepCamera/issues/70#issuecomment-1083669879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXRJ7E3QWIUKM7SVIBYHN3VCTFFJANCNFSM5RFLVL2Q . You are receiving this because you were assigned.Message ID: @.***>

solderzzc commented 2 years ago

Fixed and close.