|
522 | 522 | "\n",
|
523 | 523 | "run_inference(detection_model, cap)"
|
524 | 524 | ]
|
525 | | - }, |
526 | | - { |
527 | | - "cell_type": "markdown", |
528 | | - "metadata": { |
529 | | - "colab_type": "text", |
530 | | - "id": "DsspMPX3Cssg" |
531 | | - }, |
532 | | - "source": [ |
533 | | - "## Instance Segmentation" |
534 | | - ] |
535 | | - }, |
536 | | - { |
537 | | - "cell_type": "code", |
538 | | - "execution_count": null, |
539 | | - "metadata": { |
540 | | - "colab": {}, |
541 | | - "colab_type": "code", |
542 | | - "id": "CzkVv_n2MxKC" |
543 | | - }, |
544 | | - "outputs": [], |
545 | | - "source": [ |
546 | | - "model_name = \"mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\"\n", |
547 | | - "masking_model = load_model(\"mask_rcnn_inception_resnet_v2_atrous_coco_2018_01_28\")" |
548 | | - ] |
549 | | - }, |
550 | | - { |
551 | | - "cell_type": "markdown", |
552 | | - "metadata": { |
553 | | - "colab_type": "text", |
554 | | - "id": "0S7aZi8ZOhVV" |
555 | | - }, |
556 | | - "source": [ |
557 | | - "The instance segmentation model includes a `detection_masks` output:" |
558 | | - ] |
559 | | - }, |
560 | | - { |
561 | | - "cell_type": "code", |
562 | | - "execution_count": null, |
563 | | - "metadata": { |
564 | | - "colab": {}, |
565 | | - "colab_type": "code", |
566 | | - "id": "vQ2Sj2VIOZLA" |
567 | | - }, |
568 | | - "outputs": [], |
569 | | - "source": [ |
570 | | - "masking_model.output_shapes" |
571 | | - ] |
572 | | - }, |
573 | | - { |
574 | | - "cell_type": "code", |
575 | | - "execution_count": null, |
576 | | - "metadata": { |
577 | | - "colab": {}, |
578 | | - "colab_type": "code", |
579 | | - "id": "AS57rZlnNL7W" |
580 | | - }, |
581 | | - "outputs": [], |
582 | | - "source": [ |
583 | | - "for image_path in TEST_IMAGE_PATHS:\n", |
584 | | - " run_inference(masking_model, cap)" |
585 | | - ] |
586 | 525 | }
|
587 | 526 | ],
|
588 | 527 | "metadata": {
|
|
0 commit comments