Skip to content

基于torch框架编写的,采用的MoblieNetV3的网络架构,做的一个鸢尾花分类测试。大家fork了之后,可以直接运行。

Notifications You must be signed in to change notification settings

a281153685/MoblieNetV3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MobileNetV3

pytorch implementation of MobileNetV3

This is a pytorch implementation of MobileNetV3,which includes MobileNetV3_large and MobileNetV3_small.I pre-trained this model with oxFolower datasets of 17 classes.You can execute inference using my pre-trained weights or train your own datasets.

Inference:

inference.py provides a class named 'Detector' for inference.You can initialize a Detector object and call it's 'detector' function to execute inference.The parameters of this function are weight_path and picture_path,an example of inference are as below:

detector=Detector('large',num_classes=17)
detector.detect('./weights/best.pkl','./1.jpg')

Train model on your own datasets:

Pictures for training should be put in 'data' folder.Split your data to several folders,the name of these folders should be named from '0' to num_classes(just follow this project) then put them in 'data/splitData/train'.Note that the 'test' and 'valid' folder are not used in this project.If you need to execute testing or validation,you can modify this module. After preparing your dataset,You can choose which model to train in train.py,line 55:

net=MobileNetV3_large(num_classes=17)
net=MobileNetV3_small(num_classes=17)

You can also alternate the epoches and learning rate in the head of this file. After choosing the model you want to train and set the classes of your dataset,then run train.py to train.The weights will be saved as weights/last.pkl and weights/best.pkl.

This project is a rough implentation of MobileNetV3,you can use it as the backbone of other networks or modify it for your propose.

About

基于torch框架编写的,采用的MoblieNetV3的网络架构,做的一个鸢尾花分类测试。大家fork了之后,可以直接运行。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages