Giter Club home page Giter Club logo

solo-tf2's Introduction

基于SOLO: Segmenting Objects by Locations的实例分割(Tensorflow2实现)

版本依赖

软件 版本
Linux Ubuntu 18.04/20.04
cuda 11.1
cudnn 8.4
tensorflow 2.4.0
tensorflow-addons 可选(使用了GN)

项目结构

$ tree .
.
├── config.py
├── data
│   ├── coco -> /home/<username>/data/coco/ # Symbolic link to the datasets
│   └── coco_classes.txt                    # class name
├── decoupled_solo_r50_fpn.png              # Network Structure Generated by pydot(use tensorflow utils)
├── inference.py                            # for infertence
├── loss                                    # define the loss
│   ├── __init__.py
│   └── solo_loss.py                        # solo loss defined here
├── model                                   # define the model
│   ├── custom_layers.py                    # Resize, GN, IN, Conv2dUnit, Conv3x3 ...
│   ├── fpn.py                              # FPN
│   ├── head.py                             # Decoupled SOLO Head
│   ├── __init__.py
│   ├── resnet.py                           # ResNet, support r50 and r101
│   └── solo.py                             # SOLO Network
├── network_summary.txt
├── plotmodel.py                            # used to plot the model structure
├── pytorch2keras.py                        # convert model weight from torch style to keras or tf
├── README.md
├── requirements.txt                        # requirements
├── temp                                    # temp folder, used for debug
│   ├── 0_0.jpg
│   └── 0.jpg
├── tools                                   # dataprocess tools, for coco dataset transform
│   ├── cocotools.py
│   ├── data_process.py
│   ├── __init__.py
│   └── transform.py
├── train.py                                # train
└── weights                                 # saved weights
    ├── Decoupled_SOLO_R50_1x.h5
    ├── step00015000.h5
    └── ...

训练效果

tensorboard

参考资料

[1] SOLO: Segmenting Objects by Locations

[2] SOLOv2: Dynamic and Fast Instance Segmentation

[3] 原作者代码仓库(Pytorch和MMdetection实现)

[4] Keras-SOLO

solo-tf2's People

Contributors

ronden avatar

Stargazers

Bhabani avatar  avatar Chenying Xie avatar  avatar

Watchers

James Cloos avatar  avatar Chenying Xie avatar

solo-tf2's Issues

SOLO-TF2 inference is not working

I have tried to run the repo SOLO-TF2. The training process runs well except warning message but the inference part pops-up with the following error.
`TypeError: Exception encountered when calling layer "lambda_10" (type Lambda).

To be compatible with tf.function, Python functions must return zero or more Tensors or ExtensionTypes or None values; in compilation of <function DecoupledSOLOHead.get_seg_single..exist_objs_1.. at 0x0000024CB61C6D40>, found return value of type KerasTensor, which is not a Tensor or ExtensionType.

Call arguments received:
• inputs=['tf.Tensor(shape=(None, None, None, 40), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 36), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 24), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 16), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 12), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 40), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 36), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 24), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 16), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 12), dtype=float32)', 'tf.Tensor(shape=(None, 40, 40, 2), dtype=float32)', 'tf.Tensor(shape=(None, 36, 36, 2), dtype=float32)', 'tf.Tensor(shape=(None, 24, 24, 2), dtype=float32)', 'tf.Tensor(shape=(None, 16, 16, 2), dtype=float32)', 'tf.Tensor(shape=(None, 12, 12, 2), dtype=float32)']
• mask=None
• training=False`

Is there any solution to run the inference?

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.