Skip to content
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

Import custom model #156

Closed
balaji-skoruz opened this issue Apr 1, 2021 · 17 comments
Closed

Import custom model #156

balaji-skoruz opened this issue Apr 1, 2021 · 17 comments
Assignees
Labels
ms-beta Part of make-sense beta efforts new-feature New feature or request

Comments

@balaji-skoruz
Copy link

balaji-skoruz commented Apr 1, 2021

I need to import my custom model to annotate fast. and I have custom objects.
I am using YOLO for object detection.

@SkalskiP SkalskiP self-assigned this Aug 27, 2021
@SkalskiP SkalskiP added the question Further information is requested label Aug 27, 2021
@SkalskiP
Copy link
Owner

Hi 👋 , @balaji-skoruz! Are you using https://github.com/ultralytics/yolov5?

@balaji-skoruz
Copy link
Author

Yes.

@SkalskiP
Copy link
Owner

Ok. so far we have not anticipated the import of custom models into make-sense. But given the recently added model export functionality to yolov5 for tf.js, it seems to me that we could work out a way to import such models. I do not yet have a solution ready, but I will investigate the matter.

@SkalskiP SkalskiP added the needs-review The problem described requires deeper analysis. label Aug 27, 2021
@balaji-skoruz
Copy link
Author

Ok. Thanks,

@SkalskiP
Copy link
Owner

@glenn-jocher take a look interesting idea of using yolov5 and make-sense in a closed loop:

label images in make-sense -> use labels to train yolov5 model -> convert the model to tf.js -> use custom model to label more images -> use labels to train yolov5 model

@SkalskiP SkalskiP added ms-beta Part of make-sense beta efforts new-feature New feature or request and removed question Further information is requested needs-review The problem described requires deeper analysis. labels Dec 20, 2021
@SkalskiP
Copy link
Owner

@IuliuNovac laid a solid foundation for the implementation of this task, with his last PR. I will work on polishing his idea to add full support for YOLOv5 and uploading your own models trained using this repository.

@voicccc
Copy link

voicccc commented Aug 2, 2022

@SkalskiP hi, Can the branch that can use the yolov5-tf inference model run correctly? Tried the branch '/feature/156_import_custom_model_yolov5', but an error was reported during npm install,

@SkalskiP
Copy link
Owner

SkalskiP commented Aug 2, 2022

Hi, @voicccc 👋! We are currently in the middle of integration with yolov5, so that branch may currently not work for you.

@SkalskiP
Copy link
Owner

SkalskiP commented Oct 4, 2022

@voicccc and @balaji-skoruz that functionality has been added within #276. You can now load pre-trained and custom models to makesense.ai.

1-10-0-alpha.mov

@SkalskiP SkalskiP closed this as completed Oct 4, 2022
@5starkarma
Copy link

5starkarma commented Oct 18, 2022

d

@SkalskiP
Copy link
Owner

Hi, @5starkarma I saw in my email that you originally posted I question about .txt. file. But now I see it is no longer here. Does that mean that you managed to solve that problem on your own? :)

@5starkarma
Copy link

5starkarma commented Oct 18, 2022

Hi! Sorry about that! It wouldn't let me delete the comment!

No, I actually deleted the comment and responded on Reddit to a post you had made because I was unsure how active you were here. It says:

I tried adding a custom yolov5 model with the bin files and the json file but it is asking for a .txt labels file for classification labels. What format do I need to create this in? Would be nice if the site could tell me that as the labels aren’t automatically exported by yolov5 :)

I did however find that adding a class per line in a .txt file seems to work but I am unsure if it is the correct way.

@SkalskiP
Copy link
Owner

Hi, @5starkarma 👋! I'm actually much more active on GitHub than on Reddit.

I'm still looking for a better way to define the class names list. Unfortunately YOLOv5 tensorflow.js export does not allow you to include a class list inside the model file. That's why we need to pass them in a separate file.

Here is the GH issue where I provide instructions on how to do it: #222

If you have ideas on how to do it better. I'm really happy to listen 🧐

@5starkarma
Copy link

The way you do it actually works but, to improve your UX a small margin, it would be nice to see instructions on what format the classification list labels.txt has to be in. I figured it out but just a suggestion :)

@SkalskiP
Copy link
Owner

@5starkarma how about adding a page describing what you need to do in make-sense documentation, and including the link to the docks?

@5starkarma
Copy link

@SkalskiP that would be a great idea. It seems #282 has a similar issue. Though mine is focused on uploading a custom model. Do you need me to update the docs? If so, would you mind linking me?

@SkalskiP
Copy link
Owner

@5starkarma I already started to work on the docs update. It is something that I wanted to do for a long time, and right I'm motivated to do that. I will share the updated docs soon. I'm happy for you to review them if you will have time.

You are right. Your issue is not the only one related to the class names file. That's why I said that I'm unhappy with that solution. I frequently get issues and requests from people that feel it is hard to understand how it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ms-beta Part of make-sense beta efforts new-feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants