Giter Site home page Giter Site logo

buseyaren / installation-guide-of-maskrcnn Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 12.0 22.46 MB

Mask R-CNN creates a high-quality segmentation mask in addition to the Faster R-CNN network. In addition to class labels and scores, a segmentation mask is created for the objects detected by this neural network. In this repository, using Anaconda prompt step by step Mask R-CNN setup is shown.

Python 0.11% Jupyter Notebook 99.89%
rcnn-model deep-learning deep-neural-networks fpn rpn roi-segmentation mask-rcnn maskedinput tensorflow python

installation-guide-of-maskrcnn's Introduction

Step By Step Mask RCNN Installation

Attention❗️

  • Compatible Python Version: python==3.6.12

  • IDE: Anaconda Cloud & Conda Prompt

    -Anaconda Cloud: https://www.anaconda.com

🔺 Step 1: Compatible with Python 3.6 version, a virtual environment named maskrcnn is created in conda prompt.

conda create -n maskrcnn python=3.6.12

🔺 Step 2: The maskrcnn virtual environment is activated.

conda activate maskrcnn

🔺 Step 3: The Mask RCNN published by Matterport is cloned from the GitHub repository.

git clone https://github.com/matterport/Mask_RCNN.git

🔺 Step 4: Mask RCNN must be installed in the requirements.txt file located in the GitHub store. The requirements.txt file will load the libraries needed for your project in batch.

pip install -r requirements.txt

Dependencies

numpy, scipy, cython, h5py, Pillow, scikit-image, tensorflow==1.14.0 keras==2.0.8, jupyter or (tensorflow==1.15.0 keras==2.2.5)

For GPU: tensorflow-gpu:1.15.0, keras:2.2.5 For CPU: tensorflow:1.14.0, keras:2.0.8, h5py:2.10.0

🔺 Step 5: Download the pre-trained weights from https://github.com/matterport/Mask_RCNN/releases.

Download the file mask_rcnn_balloon.h5 from Mask_RCNN_2.1 file and mask_rcnn_coco.h5 model from Mask_RCNN_2.0 file. These 2 models should be placed in the samples folder.

Attention❗️

If the TensorFlow and Keras versions have landed in high versions, you can make a specific installation with the following commands.

🔺 Step 6: Running the setup.py file.

python setup.py install

🔺 Step 7: Loading the pycocotols module.

pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

🔺 Step 8: Let's run it on the Jupyter notebook.

jupyter notebook

A view from the project: Mask RCNN Sample

installation-guide-of-maskrcnn's People

Contributors

buseyaren avatar dilaraozdemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

installation-guide-of-maskrcnn's Issues

Im not able to run the demo after following your steps

I have done exactly what you described in the readme. I have installed 1.15.0 tensorflow with gpu and then keras 2.2.5.
I have done everything else. However when i run the jupyter notebook in the virtual environment, I get the following error

ttributeError                            Traceback (most recent call last)
<ipython-input-7-ebe7095df7bb> in <module>
     14 sys.path.append(ROOT_DIR)  # To find local version of the library
     15 from mrcnn import utils
---> 16 import mrcnn.model as modellib
     17 from mrcnn import visualize
     18 # Import COCO config

~/anaconda3/envs/maskrcnn/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda3/envs/maskrcnn/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

~/anaconda3/envs/maskrcnn/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)

~/anaconda3/envs/maskrcnn/lib/python3.6/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py in <module>
     18 import numpy as np
     19 import tensorflow as tf
---> 20 import keras
     21 import keras.backend as K
     22 import keras.layers as KL

~/.local/lib/python3.6/site-packages/keras/__init__.py in <module>
      1 from __future__ import absolute_import
      2 
----> 3 from . import utils
      4 from . import activations
      5 from . import applications

~/.local/lib/python3.6/site-packages/keras/utils/__init__.py in <module>
     22 from .layer_utils import get_source_inputs
     23 from .layer_utils import print_summary
---> 24 from .vis_utils import model_to_dot
     25 from .vis_utils import plot_model
     26 from .np_utils import to_categorical

~/.local/lib/python3.6/site-packages/keras/utils/vis_utils.py in <module>
      5 
      6 import os
----> 7 from ..models import Model
      8 from ..layers.wrappers import Wrapper
      9 

~/.local/lib/python3.6/site-packages/keras/models.py in <module>
      8 from .utils.generic_utils import has_arg
      9 from .utils.generic_utils import to_list
---> 10 from .engine.input_layer import Input
     11 from .engine.input_layer import InputLayer
     12 from .engine.training import Model

~/.local/lib/python3.6/site-packages/keras/engine/__init__.py in <module>
      1 # note: `Node` is an internal class,
      2 # it isn't meant to be used by Keras users.
----> 3 from .input_layer import Input
      4 from .input_layer import InputLayer
      5 from .base_layer import InputSpec

~/.local/lib/python3.6/site-packages/keras/engine/input_layer.py in <module>
      5 from __future__ import division
      6 
----> 7 from .base_layer import Layer
      8 from .base_layer import Node
      9 from .. import backend as K

~/.local/lib/python3.6/site-packages/keras/engine/base_layer.py in <module>
      9 
     10 from .. import backend as K
---> 11 from .. import initializers
     12 from ..utils.layer_utils import count_params
     13 from ..utils.generic_utils import has_arg

~/.local/lib/python3.6/site-packages/keras/initializers/__init__.py in <module>
    122 # from ALL_OBJECTS. We make no guarantees as to whether these objects will
    123 # using their correct version.
--> 124 populate_deserializable_objects()
    125 globals().update(LOCAL.ALL_OBJECTS)
    126 

~/.local/lib/python3.6/site-packages/keras/initializers/__init__.py in populate_deserializable_objects()
     47 
     48   LOCAL.ALL_OBJECTS = {}
---> 49   LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
     50 
     51   # Compatibility aliases (need to exist in both V1 and V2).

~/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/tensorflow_core/python/util/module_wrapper.py in __getattr__(self, name)
    191   def __getattr__(self, name):
    192     try:
--> 193       attr = getattr(self._tfmw_wrapped_module, name)
    194     except AttributeError:
    195       if not self._tfmw_public_apis:

AttributeError: module 'tensorflow._api.v1.compat.v2' has no attribute '__internal__'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.