Coder Social home page Coder Social logo

dlnn_2_1's Introduction

微调预训练的卷积神经网络实现鸟类识别

项目简介

这个项目用于处理数据集并微调预训练模型以进行图像分类任务。

数据处理(data.py)

数据处理脚本用于从数据集中提取图像并将其分为训练集和测试集。

数据集路径

数据集位于 D:\\PycharmProjects\\Image_Cls\\CUB_200_2011 目录下。

使用方法

运行 data.py 脚本以执行数据处理。

微调模型(fintune.py)

微调模型脚本用于加载预训练模型并在新数据集上进行微调。

使用方法

运行 fintune.py 脚本以执行微调模型的训练和评估。

依赖

  • Python 3.x
  • PyTorch
  • torchvision
  • pandas

使用指南

  1. 克隆项目仓库:git clone https://github.com/yourusername/yourproject.git
  2. 安装依赖:pip install -r requirements.txt
  3. 执行数据处理:python data.py
  4. 执行微调模型:python fintune.py
  5. 调整如下代码实现全模型训练
    model = models.resnet50(pretrained=False)
  6. 在如下部分可以调整超参数的实验
    def run_experiments():
     configurations = [
         #{'batch_size': 64, 'learning_rate': 0.002},
         {'batch_size': 16, 'learning_rate': 0.01},
        #{'batch_size': 32, 'learning_rate': 0.0015}
     ]
    

dlnn_2_1's People

Contributors

wqinyu avatar

Watchers

 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.