GithubHelp home page GithubHelp logo

drryanhuang / mmclassification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-mmlab/mmpretrain

0.0 0.0 0.0 11.4 MB

OpenMMLab Image Classification Toolbox and Benchmark

Home Page: https://mmclassification.readthedocs.io/en/latest/

License: Apache License 2.0

Shell 0.15% Python 99.75% Dockerfile 0.10%

mmclassification's Introduction

基础作业1: 花卉分类

配置文件为:

configs\convnext\convnext-tiny_32xb128_in1k_hw.py

有改动的数据配置文件为:

configs\_base_\datasets\imagenet_bs32_hw1_.py

我的数据 train.txtval.txt 中有前缀:

hw1/flower_dataset\val\daisy\14816364517_2423021484_m.jpg 0
hw1/flower_dataset\val\daisy\7416083788_fcb4c4f27e_n.jpg 0
hw1/flower_dataset\val\daisy\18684594849_7dd3634f5e_n.jpg 0
hw1/flower_dataset\val\daisy\6136947177_47ff445eb4_n.jpg 0

于是我在 mmcls/datasets/pipelines/loading.py 添加了 ChangePathInWindows 类:

@PIPELINES.register_module()
class ChangePathInWindows(object):

    def __init__(self,
                 remove="hw1/flower_dataset/"):
        self.remove = remove


    def __call__(self, results):
        results['img_info']['filename'] = results['img_info']['filename'].replace("\\", '/')
        results['img_info']['filename'] = results['img_info']['filename'].replace(self.remove, "")
        return results

    def __repr__(self):
        repr_str = (f'{self.__class__.__name__}('
                    'Change "\\" => "/", ',
                    f"remove '{self.remove}')")
        return repr_str

训练 log 和 模型文件在 https://github.com/DrRyanHuang/mmclassification/releases/tag/HW1

mmclassification's People

Contributors

mzr1996 avatar lxxxxr avatar xiaojieli0903 avatar ezra-yu avatar yl-1993 avatar hit-cwh avatar okotaku avatar 0x4f5da2 avatar daavoo avatar yingfhu avatar ycxioooong avatar wangruohui avatar xiefeifeihu avatar imyhxy avatar qingchuanws avatar zwwwayne avatar congee524 avatar wangjiangben-hw avatar hudi2018 avatar twmht avatar rangilyu avatar runningleon avatar ftbabi avatar fangxu622 avatar timothylimyl avatar crescent-saturn avatar hellock avatar junjun2016 avatar peterh0323 avatar nijkah 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.