Giter Site home page Giter Site logo

dzh358 / zisan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goatyoung/zisan

0.0 1.0 0.0 2.32 MB

Integrated CV basic application development kit based on Pytorch 基于Pytorch的集成CV基础应用开发工具包

License: MIT License

Python 100.00%

zisan's Introduction

Install zisan

JintuZheng Jan 25th 2020

Last page: wiki: Strat pytorch

Step1: Install zisan package

Two easy ways to install zisan. Input the follow command:

pip install zisan

Also you can download the wheel file on the official site: http://jintupersonal.com/zisan/

Pay attention to the lastest version to modify your pip command.

Step2: Prepare the weight files for zisan

Firstly you should download the weights files for zisan. You can find the url button on homepage: Download weights link:https://pan.baidu.com/s/1qj-Lpe4OKV0L-w9uKO8EFw key:x9wl The weight files structure is followed:

Instance_Seg_weight (Folder)

Jintu_SEG_Interactive.pth (178 MB)

ObjectDetect_data_weights (Folder)

runBox.zip (475 MB)

Unzip runBox.zip, you will see three folders, they are "cfgs", "data", "weights".

cfgs: Here put the network configs

data: Put your data preparing to train

weights: Here save the raw yolo weights and your last output weights

IMPORTANT !

DON'T RECHANGE THE FOLDER'S NAME !

DON'T RECHANGE THE FOLDER'S NAME !

DON'T RECHANGE THE FOLDER'S NAME !

you can't rechange the "cfgs", "weights", "data" and their child folders name, because zisan. Objedetect class will use the refer all folders' name, if you rechange them, it will happen errors. But you can set your current path and as parameters in function.

more details you can refer the following page: wiki: Train your dataset

How to use these weights? You will find your answer in the following Demo Courses.

Next page: wiki: Class ImgSeg

Demo: A person segmentation

JintuZheng Jan 26th 2020

Raw page: wiki: Demo: A person segmentation Last page: wiki: Demo: A Box segmentation

Prepare a person picture

From davis 2017

(This picture is from dataset davis2017) Find the person and give him bone marks, like the following. Maybe it's very abstract. Monofilament doesn't affect our segmentation of objects。

Import Packages

from zisan.Seg.Interface import ImgSeg, markTools
import os
import numpy as np
import cv2
from PIL import Image

Draw mask

lines=[[(281,120),(267,341)],[(279,157),(208,171)],[(309,170),(308,250)],[(275,233),(370,341)]]
img=Image.open(current_path+'/temp/1.jpg').convert('RGB')
markpen=markTools(img.height,img.width)
for line in lines:
	markpen.curveDraw(line,is_Pos=True)

[(281,120),(267,341)] is a line element lines is a line list=[[(,),(,)]]

mask Preview

Instance segmentation

re=markpen.getMark_result(is_showPreview=True)
model.ImgSeg_SingleObj(img,re,is_showPreview=True)

Binary mask result preview: result

Fade mask show preview:

fade

zisan have the Yolov3 interface to train your own dataset. Please view the next part: wiki: Package: Object detect

zisan's People

Contributors

jintuzheng avatar

Watchers

James Cloos 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.