cloud-annotations / object-detection-react

⚛️ Real-Time Custom Object Detection with TensorFlow.js
MIT License
255 stars 108 forks source link

Could not open ObjectDetectionVideo.js in the editor. #28

Closed dryptm closed 3 years ago

dryptm commented 3 years ago

The react app is not able to load on the localhost:3000 in the chromium based browsers like Google Chrome or Edge but it is working fine on Firefox.

The issues below come after including my personal model. So the model is not undefined.

Issue that it says on the browser, it says : Unhandled Rejection (TypeError): Cannot read property 'detect' of undefined and on the console, it says: Could not open ObjectDetectionVideo.js in the editor. image

image

bourdakos1 commented 3 years ago

That normally means the model is a classification model and not an object detection model

bourdakos1 commented 3 years ago

oh it works in firefox? like you are getting detections?

dryptm commented 3 years ago

oh it works in firefox? like you are getting detections?

Yes, it is working in firefox I am getting detections

bourdakos1 commented 3 years ago

Interesting, do you mind sharing your model so I can try and debug in chrome?

dryptm commented 3 years ago

Interesting, do you mind sharing your model so I can try and debug in chrome?

no problem... you will get the model in the public folder of this project, the link is down below... https://github.com/dryptm/Pothole_detection-System don't clone my project to be on the safer side, rather use this model in the actual object-detection-react project.

dryptm commented 3 years ago

That normally means the model is a classification model and not an object detection model

but this react app is for object detection, not for classification. so why does it show the classification errors!?

bourdakos1 commented 3 years ago

I’m not sure I understand the question

dryptm commented 3 years ago

I’m not sure I understand the question

its okay, skip the question... by the way, did you debug the code !?

bourdakos1 commented 3 years ago

I haven’t had a chance yet

dryptm commented 3 years ago

I haven’t had a chance yet

Ooh...

dryptm commented 3 years ago

if you build the project and then run it, it runs fine on every browser!!!

bourdakos1 commented 3 years ago

Thanks for the update :)

ykoyfman commented 3 years ago

@dryptm I'm running into this as well (on Android mobile Chrome) - can you elaborate on what your solution was?

dryptm commented 3 years ago

@dryptm I'm running into this as well (on Android mobile Chrome) - can you elaborate on what your solution was?

just build the app and it will take care of all the files itself!

ykoyfman commented 3 years ago

Looks like I can only get things working in Chrome/Android when I use the forward facing camera (which is the default.) When I tried switching the webcam to the 'environment' facingMode, that's when I started hitting these errors.

bourdakos1 commented 3 years ago

@ykoyfman this is probably causing that issue: https://github.com/cloud-annotations/object-detection-react/blob/f3f4a902a63a8f6aee57be12529dc05c19dffcb0/src/object-detection-video/useWebcam.js#L10

dryptm commented 3 years ago

Looks like I can only get things working in Chrome/Android when I use the forward facing camera (which is the default.) When I tried switching the webcam to the 'environment' facingMode, that's when I started hitting these errors.

I myself don't know how to switch the cameras in the respective devices....... so I am very sorry but I can not help with this