Git Product home page Git Product logo

attention-panet's Introduction

Attention-PANet

This is an implementation of Attention PANet for Object Detection in Aerial Images. The model generates bounding boxes and segmentation masks for each instance of an object in the image. It's based on mattport Mask RCNN which using keras and tensorflow. The difference is three functions : AttentionModule, SpatialAttention and ChannelAttention in MaskRCNN class in mrcnn/model.py file. All dependencies are mentioned in the requirements.txt.

Instance Segmentation Sample

Commands to prepare the project

conda config --append channels conda-forge

conda create -n dl_proj13 python=3.5

conda activate dl_proj13

pip install --upgrade pip

git clone https://github.com/Zangir/Attention-PANet.git

pip install -r requirements.txt

conda install -c conda-forge gcc

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

cd Attention-PANet/

rename mrcnn folder name to panet

python setup.py install

rename panet folder name to mrcnn

pip install --upgrade prompt-toolkit==2.0.1

pip3 install --upgrade --force jupyter-console

create logs/ folder

download mask_rcnn_coco.h5 (https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5) and put it to logs/ folder

Useful information

The main file is samples/coco/coco.py used for both training and evaluation.

It uses MaskRCNN class in mrcnn/model.py, which is implementation of basic PANet model.

By default it uses COCO, but iSaid and any other dataset can be provided in separate folder and mentioned as --dataset='path_data' while running coco.py.

Demo.txt file shows input commands to train and evaluate COCO dataset and corresponding outputs.

Useful commands

Navigate project

conda activate dl_proj13

cd Attention-PANet/

First run with downloading COCO data

python3 samples/coco/coco.py train --dataset='COCO_data' --model='logs/mask_rcnn_coco.h5' --download=True

From the second run

python3 samples/coco/coco.py train --dataset='COCO_data' --model='logs/mask_rcnn_coco.h5' --download=False

To evaluate the model

python3 samples/coco/coco.py evaluate --dataset='COCO_data' --model='logs/mask_rcnn_coco.h5' --download=False

Useful links

PANet paper

https://github.com/ryanzhangfan/PA-Net

mrcnn demo

https://github.com/matterport/Mask_RCNN/blob/master/README.md

attention-panet's People

Contributors

zangir avatar

Stargazers

Artyom avatar

Watchers

 avatar

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.