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

Objectdetection #268

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from
Open

Objectdetection #268

wants to merge 16 commits into from

Conversation

jimbo797
Copy link
Collaborator

No description provided.

/**
* Dimensions of the video frame
*/
DIMENSIONS = [480, 360];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property should really be centralized onto the video mixin. Want to update that code to include this property? https://github.com/mitmedialab/prg-extension-boilerplate/blob/dev/extensions/src/common/extension/mixins/optional/video.ts

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think it'd be better to encode this as an object as

{ width: number, height: number }

(instead of an array)

arg: {
type: "number",
defaultValue: 5,
handler: (x) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, is the handler actually doing? @pmalacho-mit to look

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmalacho-mit Looks like it isn't doing anything... Did I put the handler in the right spot?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimbo797 ya, I think this is in the wrong spot. Did your editor not give you errors? Here's what it looks like for me:
Screen Shot 2023-05-29 at 4 20 09 PM

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only have a handler when you have a menu that accepts reporters. So this would be correct (but note you'll need to deal with typescript errors because the input to the handler is of type uknown so you'll need to do some casting to make it happy):
Screen Shot 2023-05-29 at 4 21 07 PM

@pmalacho-mit
Copy link
Collaborator

frisbee...
Screen Shot 2023-05-17 at 9 25 05 AM

text: (state) => `Turn continuous detection ${state}`,
arg: { type: ArgumentType.Boolean, options: [{ text: 'on', value: true }, { text: 'off', value: false }] }
})
async continuouslyDetectObjects(state) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to specify that the state argument is a boolean for typescript to be happy. Is your editor not showing you errors? Here's what it looks like for me:
Screen Shot 2023-05-29 at 4 23 05 PM

@pmalacho-mit
Copy link
Collaborator

Nice, @jimbo797 ! Few more comments for you to check out.

Also, go generate a cool thumbail and logo, please!

@pmalacho-mit
Copy link
Collaborator

(sorry, @jimbo797 I accidentally closed this. Ignore that!)

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

Successfully merging this pull request may close these issues.

None yet

2 participants