• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Crypto Currency
  • Technology
  • Contact
NEO Share

NEO Share

Sharing The Latest Tech News

  • Home
  • Artificial Intelligence
  • Machine Learning
  • Computers
  • Mobile
  • Crypto Currency

Part 2: Starting off with Image Segmentation using Mask R-CNN!

March 6, 2021 by systems

Aryan Vij
Credits: Matterport, Inc

See that picture above? That is what this part is all about.

We will use Matterport’s pre-trained COCO dataset (mask_rcnn_balloon.h5) & and annotated images ( balloon_dataset.zip) to test how the model works and what to expect.

To test the model, we will be using a Jupyter Notebook!

  1. Head to your Anaconda Navigator and open a Terminal window in the SAME environment that we installed all the requirements in (in the previous part).
  2. Navigate to your ‘Mask-R-CNN’ directory that was cloned from GitHub in the previous part.
  3. Type in jupyter-notebook . This will open up our Jupyter Notebook!
  4. Navigate to /samples/balloon/ and open the inspect_balloon_model.ipynb notebook.

Navigating to your file directory!

  1. Open up the Jupyter notebook. It should look like this:
Jupyter Notebook

2. If you have followed my exact file structure (from Part 1), then you will not have to make any changes to this script. You can skip to Step 6!

3. Look out for all the #MUST EDIT! . Modify your ROOT_DIR to the directory of the Mask-R-CNN file. It could be as such:

The ‘r’ before the directory string is only necessary for Windows users. An alternative to this would be using ‘/’ or ‘\’ instead of ‘’

4. Change your BALLOON_WEIGHTS_PATH . os.path.join combined directories together. Therefore, your BALLOON_WEIGHTS_PATH could be:

Change the “samples/balloon” according to how your file structure. This “balloon” is the main balloon folder.

5. Change your BALLOON_DIR to the folder which consists of the images (the balloon dataset). It could be:

Alright! Now the script is ready for us to play around with 😃!

Just press SHIFT & ENTER in every block. I have added a small print statement that will show you “Completed!” after the code in each block has been executed.

Wait to see this “Completed!” before executing the next block!

And there we have it! Now you should be able to run this detection and segmentation model! Stay tuned for Part 3 on how to create your own segmentation model FROM SCRATCH!

Filed Under: Machine Learning

Primary Sidebar

Stay Ahead: The Latest Tech News and Innovations

Cryptocurrency Market Updates: What’s Happening Now

Emerging Trends in Artificial Intelligence: What to Watch For

Top Cloud Computing Services to Secure Your Data

The Future of Mobile Technology: Recent Advancements and Predictions

Footer

  • Privacy Policy
  • Terms and Conditions

Copyright © 2025 NEO Share

Terms and Conditions - Privacy Policy