Coder Social home page Coder Social logo

multi_label_image_classification's Introduction

Multi-label Image Classification

  • 多目标多分类基础模型,模型采用ResNet_101,ImageNet预训练。
  • 训练集与验证集采用MS COCO。

Pre-requisite

  • python
  • torch
  • torchvision
  • numpy
  • PIL
  • matplotlib(如果需要展示图像)

Data

使用MS COCO数据集。

图像处理方式:

  1. 随机裁剪
  2. 随机翻转
  3. 归一化

Model

Multi-Class_ResNet.pkl(163MB)

How to use

修改路径参数、超参数等统一:vim xxx.python

  1. Clone:
    • git clone https://github.com/MagicianQi/multi_label_image_classification
    • cd ./multi_label_image_classification
  2. 生成MS COCO分类标签:
    • 生成标签文件:python ./scrpits/generate_coco_labels.py
  3. 训练:
    • 训练 :python resnet_multi_label.py
    • 后台训练:screen python resnet_multi_label.py
  4. 验证:
    • 计算准确率(acc):python evaluate_multi_label_acc.py
    • 计算召回率(recall):python evaluate_multi_label_recall.py
  5. 测试:
    • 测试图像结果:python testing_multi_label.py 1.jpg 2.jpg 3.jpg

展示

Image:

Result(Top5):

['person', 0.9997881], ['cell phone', 0.7692987], ['tv', 0.6630157], ['laptop', 0.5872826], ['tie', 0.24580538]

multi_label_image_classification's People

Contributors

magicianqi avatar shuoqi 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.