Skip to content

OutBreak-hui/python_developer_tools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python_developer_tools

python 开发过程中常用到的工具;包括网站开发,人工智能,文件,数据类型转换 支付接口对接,外挂,bat,sh等我在工作中常用到的开发工具

安装和使用

pip uninstall python_developer_tools
pip install git+https://github.com/carlsummer/python_developer_tools.git
from python_developer_tools import cv

Contents



Depthwise Separable Convolution Usage

Paper

"MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications"

Overview

Code

感谢代码来源External-Attention-pytorch

import torch
from python_developer_tools.cv.bases.conv.DepthwiseSeparableConvolution import DepthwiseSeparableConvolution
input=torch.randn(1,3,224,224)
dsconv=DepthwiseSeparableConvolution(3,64)
out=dsconv(input)


MBConv

Paper

Rethinking model scaling for convolutional neural networks

Overview

Code

感谢代码来源External-Attention-pytorch

from python_developer_tools.cv.bases.conv.MBConv import MBConvBlock
import torch
input=torch.randn(1,3,112,112)
mbconv=MBConvBlock(ksize=3,input_filters=3,output_filters=3,image_size=112)
out=mbconv(input)
print(out.shape)


Involution

Paper

Inverting the Inherence of Convolution for Visual Recognition

Overview

Code

感谢代码来源External-Attention-pytorch

from python_developer_tools.cv.bases.conv.Involution import Involution
import torch
input=torch.randn(1,4,64,64)
involution=Involution(kernel_size=3,in_channel=4,stride=2)
out=involution(input)
print(out.shape)

SSM

Paper

Exploiting Featureswith Split-and-Share Module

Overview

code
from python_developer_tools.cv.bases.FC.SSM import SSM
import torch
x = torch.randn(2, 2048, 1, 1)
x = x.view(x.size(0), -1)
model = SSM()
out = model(x)
print(out.shape)

AlexNet

Code

import torch
from python_developer_tools.cv.classes.AlexNet import AlexNet
model = AlexNet()
input = torch.randn(8,3,224,224)
out = model(input)
print(out.shape)


DenseNet

Code

import torch
from python_developer_tools.cv.classes.DenseNet import DenseNet121
model = DenseNet121()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


Efficientnet

Code
import torch
from python_developer_tools.cv.classes.Efficientnet import EfficientNet
model = EfficientNet('efficientnet_b0')
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


InceptionV1

Code

import torch
from python_developer_tools.cv.classes.InceptionV1 import InceptionV1
model = InceptionV1()
input = torch.randn(1, 3, 224, 224)
aux1, aux2, out = model(input)
print(aux1.shape)
print(aux2.shape)
print(out.shape)


InceptionV2

Code

import torch
from python_developer_tools.cv.classes.InceptionV2 import InceptionV2
model = InceptionV2()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


InceptionV3

Code

import torch
from python_developer_tools.cv.classes.InceptionV3 import InceptionV3
model = InceptionV3()
input = torch.randn(1, 3, 299, 299)
aux,out = model(input)
print(aux.shape)
print(out.shape)


repVGGNet

Code

import torch
from python_developer_tools.cv.classes.repVGGNet import RepVGG_A1
model = RepVGG_A1()
input = torch.randn(1,3,224,224)
out = model(input)
print(out.shape)


ResNet

Code

import torch
from python_developer_tools.cv.classes.ResNet import ResNet50
model = ResNet50()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


ResNeXt

Code

import torch
from python_developer_tools.cv.classes.ResNeXt import ResNeXtBlock
model = ResNeXtBlock(in_places=256, places=128)
input = torch.randn(1,256,64,64)
out = model(input)
print(out.shape)


VGGNet

Code
import torch
from python_developer_tools.cv.classes.VGGNet import VGG16
model = VGG16()
input = torch.randn(1,3,224,224)
out = model(input)
print(out.shape)


GhostNet

Code

import torch
from python_developer_tools.cv.classes.GhostNet import GhostNet
model = GhostNet()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


MixNet

Code

import torch
from python_developer_tools.cv.classes.MixNet import MixNet
model = MixNet(type ='mixnet_m')
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


MobileNetV1

Code

import torch
from python_developer_tools.cv.classes.MobileNetV1 import MobileNetV1
model = MobileNetV1()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


MobileNetV2

Code

import torch
from python_developer_tools.cv.classes.MobileNetV2 import MobileNetV2
model = MobileNetV2()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


MobileNetV3

Code

import torch
from python_developer_tools.cv.classes.MobileNetV3 import MobileNetV3
model = MobileNetV3(type='small')
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


MobileNetXt

Code

import torch
from python_developer_tools.cv.classes.MobileNetXt import MobileNetXt
model = MobileNetXt()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


ShuffleNet

Code

import torch
from python_developer_tools.cv.classes.ShuffleNet import shufflenet_g1
model = shufflenet_g1()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


ShuffleNetV2

Code
import torch
from python_developer_tools.cv.classes.ShuffleNetV2 import shufflenet_v2_x2_0
model = shufflenet_v2_x2_0()
input = torch.randn(1, 3, 224, 224)
out = model(input)
print(out.shape)


SqueezeNet

Code

import torch
from python_developer_tools.cv.classes.SqueezeNet import SqueezeNet
model = SqueezeNet()
input = torch.rand(1,3,224,224)
out = model(input)
print(out.shape)


Xception

Code

import torch
from python_developer_tools.cv.classes.Xception import Xception
model = Xception()
input = torch.randn(1,3,299,299)
output = model(input)
print(output.shape)


files

common

名称功能
get_filename_suf_pix获取路径的文件名,后缀,父路径
***

About

SMM(替换全连接模块)python_developer_tools

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 98.2%
  • HTML 0.5%
  • Cuda 0.5%
  • JavaScript 0.3%
  • C++ 0.1%
  • Shell 0.1%
  • Other 0.3%