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

Add "Properties" for each model #88

Open
QuinnHe opened this issue Jun 17, 2024 · 11 comments
Open

Add "Properties" for each model #88

QuinnHe opened this issue Jun 17, 2024 · 11 comments

Comments

@QuinnHe
Copy link
Collaborator

QuinnHe commented Jun 17, 2024

No description provided.

@MOQN
Copy link
Member

MOQN commented Jun 17, 2024

@alanvww, would you be available to handle this task this week? If not, we could totally do this next week after the soft launch.

@alanvww
Copy link
Member

alanvww commented Jun 17, 2024

@MOQN I can do this with the method descriptions. The content is pretty related, but it will be easier if someone can co-review the content with me. I will also create a PR for the method part ASAP so @ziyuan-linn Peter can check if anything is missing.

@MOQN
Copy link
Member

MOQN commented Jun 17, 2024

Thank you! I could also review from next week!!

@alanvww
Copy link
Member

alanvww commented Jun 18, 2024

Hi Quinn, can you check the BodyPose section in #93 to see if it is good? I added more descriptions and completed the list of methods based on the source code. My understanding is that the "properties" are the options when we load the model? It would be great if you could elaborate on this a bit more.

@QuinnHe
Copy link
Collaborator Author

QuinnHe commented Jun 18, 2024

Hi Quinn, can you check the BodyPose section in #93 to see if it is good? I added more descriptions and completed the list of methods based on the source code. My understanding is that the "properties" are the options when we load the model? It would be great if you could elaborate on this a bit more.

Hi @alanvww , my understanding is - "properties" is the attributes of the bodyPose class. See screenshots for reference.

Screenshot 2024-06-17 at 8 41 58 PM Screenshot 2024-06-17 at 8 39 06 PM

And I will comment in #93 .

@ziyuan-linn
Copy link
Member

Hi @MOQN @alanvww @QuinnHe thank you for adding the properties section to the models!

I just noticed this section when looking at the website today. I am sorry that I didn't bring this up earlier, but to my understanding, the model properties are private and are not really meant to be accessed by the end users. If the users try to change the properties on a model, it might break.

I don't have a strong feeling about it, but perhaps it would be better if we could eventually move the properties information to a more technical section of our documentation?

@alanvww
Copy link
Member

alanvww commented Aug 6, 2024

Hi @MOQN @alanvww @QuinnHe thank you for adding the properties section to the models!

I just noticed this section when looking at the website today. I am sorry that I didn't bring this up earlier, but to my understanding, the model properties are private and are not really meant to be accessed by the end users. If the users try to change the properties on a model, it might break.

I don't have a strong feeling about it, but perhaps it would be better if we could eventually move the properties information to a more technical section of our documentation?

Hey Peter, thanks for bringing this up. The current properties for each model are based on the model object created using the method call, like xxx = ml5.xxx(). I totally agree with you; we should encourage learners and developers to use the option instead of tweaking the properties. If we all agree to remove it, let’s do it!

One more thing I noticed while I’m slowly reviewing each model (sorry for the delay…) is that, for BodyPix in BodySegmentation, it’s now returning a BodyPix palette in the model object property:
image
Not sure about what the plan is for this palette yet, but to address your point, maybe something to try is wrap this data into a public method like how we handle getSkeleton in BodyPose?

@MOQN
Copy link
Member

MOQN commented Aug 8, 2024

@ziyuan-linn thank you for addressing this important issue!

Hey Peter, thanks for bringing this up. The current properties for each model are based on the model object created using the method call, like xxx = ml5.xxx(). I totally agree with you; we should encourage learners and developers to use the option instead of tweaking the properties. If we all agree to remove it, let’s do it!

I agree with @alanvww. I believe it would be better to remove the private properties from the reference pages.

@shiffman
Copy link
Member

shiffman commented Aug 8, 2024

Agreed too!!

@ziyuan-linn
Copy link
Member

@alanvww Here is the PR that introduced the palette with a discussion. ml5js/ml5-next-gen#139. Those are meant to be public properties.

We could either wrap this data in a public method or document those public properties depending on how everyone feels.

Either way, I believe this is the only instance of public properties and all other properties are supposed to be private. I will also make sure to mark the properties as private when updating the comments.

Side note: Alan thank you so much for reviewing the models! Which specific models are you currently working on? Just want to check in to make sure we don't end up working on the same thing :)

@alanvww
Copy link
Member

alanvww commented Aug 9, 2024

@ziyuan-linn Got it! Looks like we all agree on removing the private properties and I will update the docs soon.

For the palette, I think I could try to implement the getPartsId() we were talking about? This is something new to me, but I will certainly ask more of you to review.

As for reviewing, my focus right now is on getting the source code in line with the docs. Meanwhile, also cleaning up the code when I can. So it might be very slow. Three models that are in progress are BodyPose, BodySegmentation (these with your latest updates) and HandPose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants