Code Monkey home page Code Monkey logo

dl_lecture_competition_pub's Introduction

DL基礎講座2024 最終課題「脳波分類」

環境構築

conda create -n dl-meg python=3.10
conda activate dl-meg
pip install poetry
poetry install

モデルを動かす

訓練

poetry run python main.py

# オンラインで結果の可視化(wandbのアカウントが必要)
poetry run python main.py use_wandb=True
  • outputs/{実行日時}/に重みmodel_best.ptmodel_last.pt,テスト入力に対する予測submission.npyが保存されます.submission.npyをOmnicampusに提出することで,test top-10 accuracyが確認できます.

    • model_best.ptはvalidation top-10 accuracyで評価
  • 訓練時に読み込むconfig.yamlファイルはtrain.pyrun()@hydra.mainデコレータで指定しています.新しいyamlファイルを作った際は書き換えてください.

評価のみ実行

  • テストデータに対する評価のみあとで実行する場合.出力されるsubmission.npyは訓練で最後に出力されるものと同じです.
poetry run python eval.py model_path={評価したい重みのパス}.pt

データセット[link]の詳細

  • 1,854クラス,22,448枚の画像(1クラスあたり12枚程度)

    • クラスの例: airplane, aligator, apple, ...
  • 各クラスについて,画像を約6:2:2の割合で訓練,検証,テストに分割

  • 4人の被験者が存在し,どの被験者からのサンプルかは訓練に利用可能な情報として与えられる (*_subject_idxs.pt).

データセットのダウンロード

  • こちらからdata.zipをダウンロードし,data/ディレクトリに展開してください.

  • 画像を事前学習などに用いる場合は,ドライブからimages.zipをダウンロードし,任意のディレクトリで展開します.{train, val}_image_paths.txtのパスを使用し,自身でデータローダーなどを作成してください.

タスクの詳細

  • 本コンペでは,被験者が画像を見ているときの脳波から,その画像がどのクラスに属するかを分類します.

  • 評価はtop-10 accuracyで行います.

    • モデルの予測確率トップ10に正解クラスが含まれているかどうか
    • つまりchance levelは10 / 1,854 ≒ 0.54%となります.

dl_lecture_competition_pub's People

Contributors

decfrr avatar seannobel avatar masa-su 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.