-
-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented YoloV5 as a 3rd model for inference. #220
Implemented YoloV5 as a 3rd model for inference. #220
Conversation
…option for object detection. You can import you own custom model in the public/yolov5 folder. Disclaimer, I don't know javascript. Expect code not to meet the guidelines and might be buggy
Hello @IuliuNovac 👋 ! And thank you very much for your interest in our project. I must admit that it is a pretty good starting point for further work, but as you yourself noticed it is not yet ready to be included in the production version of MS.
|
"@tensorflow/tfjs-backend-webgl": "^3.9.0", | ||
"@tensorflow/tfjs-core": "^3.9.0", | ||
"@tensorflow/tfjs-node": "^3.9.0", | ||
"@tensorflow/tfjs-backend-cpu": "^3.8.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed issues with different versions of tfjs, the 3.9.0 on other hand led to some issues. Could be that my project wasn't rebuild correctly.
private static width = 640; | ||
private static height = 640; | ||
public static AIModel = AIModel.OBJECT_DETECTION; | ||
private static names = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not ok, it should be imported from a separate json file.
callback(predictions); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires refactoring, adding a confidence threshold a user can select would be nice. I was training the model, but in the first iterations the confidence of identifying my object was low. Unfortunately i was not able to change the confidence coefficient.
@@ -1,4 +1,5 @@ | |||
export enum AIModel { | |||
OBJECT_DETECTION = "OBJECT_DETECTION", | |||
POSE_DETECTION = "POSE_DETECTION" | |||
POSE_DETECTION = "POSE_DETECTION", | |||
OBJECT_DETECTION_YOLOv5 = "OBJECT_DETECTION_YOLOv5" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably Object_Detection and Pose Detection should have a separate enum to chose between SSD, YOLO, etc.
store.dispatch(updateActivePopupType(PopupWindowType.SUGGEST_LABEL_NAMES)); | ||
} else { | ||
store.dispatch(updateActivePopupType(null)); | ||
switch (ObjectDetectorYolov5.AIModel) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the horrible quick fix i made, too chunky. Also, i am storing the variable to switch between which model to use for prediction in the ObjectDetectorYolov5, that's horrible . I did not know how pass the value in AIModel to this object.
As a result, i introduced a bug that doesn't allow you to pick SSD after you pick YOLO.
Hi @SkalskiP , that sounds quite good. By no means someone should use this branch unless they just need to run YOLOv5 alone. I used it to train a yolov5 model. The steps where simple:
Note: You should not rely on the yolo model to assist for labeling, but rather evaluate the short comings. Since you can skip the images labeled right, while focusing on labeling the faulty predictions. |
Hi @IuliuNovac, that's exactly how I envision this feature. The only difference is that instead of
I'll let you know the progress soon. You can see how I'm doing on |
This is the second option for object detection. You can import you own custom model by replacing the public/yolov5 folder.
Disclaimer, I don't know JavaScript, i have no clue how this language works!!!
I just managed to get it work, since i need this feature. Expect code not to meet the guidelines and might be buggy.
private static names = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow'....
Support all general variations of Yolov5, but missing a way to to chose between them.
Pre-flight checklist