-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Add object detection and image segmentation models to the task API #705
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
Conversation
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.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @jinjingforever)
coco-ssd/src/index.ts, line 42 at r1 (raw file):
export interface ModelConfig { /** * It determines wich PoseNet architecture to load. The supported
typo PoseNet
: object detection
tasks/package.json, line 30 at r1 (raw file):
"@tensorflow/tfjs-core": "^3.5.0", "@tensorflow/tfjs-tflite": "0.0.1-alpha.3", "@tensorflow-models/mobilenet": "link:../mobilenet",
should this be updated to a fix version before releasing?
tasks/src/tasks/image_segmentation/deeplab_tfjs.ts, line 67 at r1 (raw file):
options.quantizationBytes = 2; } const deeplabModel = await sourceModelGlobal.load(options);
can you remind me how the dependencies are loaded for the model npm?
tasks/src/tasks/object_detection/tflite_common.ts, line 50 at r1 (raw file):
}); const finalResult: ObjectDetectionResult = { objects,
remove the last ,
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.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @pyu10055)
coco-ssd/src/index.ts, line 42 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
typo
PoseNet
: object detection
Done.
tasks/package.json, line 30 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
should this be updated to a fix version before releasing?
I think this part is probably fine. This is only for development. The actual versions of package to load are in the task model's metadata.
tasks/src/tasks/image_segmentation/deeplab_tfjs.ts, line 67 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
can you remind me how the dependencies are loaded for the model npm?
The package loader will load the packages defined in packageUrls
. When it finishes, the global namespace (e.g. mobilenet
, deeplab
, etc) will be initialized by loaded packages. That global namespace variable will be passed to this transformSourceModel
method (the sourceModelGlobal
parameter) and it will be used here to call its function (load
in this case) to load the source model.
tasks/src/tasks/object_detection/tflite_common.ts, line 50 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
remove the last
,
Done.
This change is