Giter Site home page Giter Site logo

liver_classfication_and_enhancement-main's Introduction

Liver_Classfication_and_enhancement-main

使用AlexNet、GoogLeNet、ResNet完成图像分类任务,正确率分别达到98.57%、99.21%、99.43%;使用RGHS完成对图像亮度的增强,转成CIE-Lab颜色模型完成颜色的均衡,使得图像的可视化效果更好

项目文件介绍

  • data 数据
    • train_set 训练数据包含六种类别(4、58、67、123、1234、5678)
    • test_set 测试数据包含六种类别
  • enhance_after_data\RGHS 增强后的图像
  • enhance_before_data 增强前的图像
  • RGHS 增强部分的代码
    • main.py 主函数
    • global_Streching_RGB.py 进行图像的归一化
    • stretchRange.py 确定图像直方图需要保留的范围
    • relativeglobalhistogramstreching.py RGHS进行直方图伸缩
    • global_StrechingL.py 和上面的函数二选一,进行直方图伸缩
    • LabStreching.py 颜色均衡的主函数
    • global_streching_ab.py 按照s模型进行颜色均衡
  • net 分类使用的网络模型
    • alexnet.py
    • googlenet.py
    • resnet.py
    • unet.py(实际没用到)
  • results 分类网络训练和测试的运行记录
  • weight 分类网络预训练模型
  • class_indices.json 六种分类对应的下标映射
  • dataset.py 数据预处理
  • eval_map.py mAP指标的计算过程
  • train.py 分类网络模型的训练
  • test.py 分类网络模型的测试
  • utils.py 一些工具函数, 比如获取模型参数、获取图像路径和分类

项目运行环境配置

CPU

  • pytorch 3.6.5
  • opencv-python 1.19.5

GPU(分类)

pytorch==1.11 py3.8_cuda11.3_cudnn8.2.0

分类网络运行参数

python train.py 或 python test.py

  • --model 指定使用哪一个网络模型,默认是“resnet”,取值有{“resnet”,“googlenet”,“alexnet”}
  • --weights 分类模型的预训练路径,需要时指定
  • --device 分类模型运行设别,默认是“cuda:0”
  • --num_classes 分类数,默认是6
  • --epochs 迭代次数,默认是50
  • --batch-size batch大小,默认是8
  • --lr 学习率,默认是5e-4
  • --wd 权重衰减率,默认是5e-2
  • --train-set 训练集路径,默认是“data/train_set”
  • --test-set 测试集路径,默认是“data/test_set”

liver_classfication_and_enhancement-main's People

Contributors

cinderella1001 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.