Skip to content

Conversation

jinjingforever
Copy link
Collaborator

@jinjingforever jinjingforever commented May 11, 2021

  • The code for object detection and image segmentation is very similar structurally to the image classification code.
  • Add the summary table to README. See preview here. The API doc links are placeholders. The other links (demos, model requirements, model collections) should work. I will add more stuff to this table as I add more models to the task API.
  • Minor tweaks to code to make things better for doc-gen and usability.

This change is Reviewable

@google-cla google-cla bot added the cla: yes label May 11, 2021
@jinjingforever jinjingforever requested a review from pyu10055 May 11, 2021 18:54
Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: 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 ,

Copy link
Collaborator Author

@jinjingforever jinjingforever left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: 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.

@jinjingforever jinjingforever merged commit ab97e06 into master May 13, 2021
@jinjingforever jinjingforever deleted the addmoretasks branch May 13, 2021 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants