rrayy
commited on
Commit
·
9b91cd8
1
Parent(s):
cd592fd
Changes to be committed: 데이터 수정 및 토크나이저 삭제
Browse filesmodified: data/10.mid
modified: data/16.mid
modified: data/28.mid
modified: data/4.mid
modified: preprocessing.ipynb
modified: requirements.txt
deleted: utillity/miditokenizer.py
- data/10.mid +0 -0
- data/16.mid +0 -0
- data/28.mid +0 -0
- data/4.mid +0 -0
- preprocessing.ipynb +0 -0
- requirements.txt +63 -100
- utillity/miditokenizer.py +0 -21
data/10.mid
CHANGED
|
Binary files a/data/10.mid and b/data/10.mid differ
|
|
|
data/16.mid
CHANGED
|
Binary files a/data/16.mid and b/data/16.mid differ
|
|
|
data/28.mid
CHANGED
|
Binary files a/data/28.mid and b/data/28.mid differ
|
|
|
data/4.mid
CHANGED
|
Binary files a/data/4.mid and b/data/4.mid differ
|
|
|
preprocessing.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
requirements.txt
CHANGED
|
@@ -1,113 +1,76 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
cachetools==5.3.2
|
| 6 |
-
certifi==2024.2.2
|
| 7 |
-
cffi==1.16.0
|
| 8 |
chardet==5.2.0
|
| 9 |
-
charset-normalizer==3.
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
cycler==0.12.1
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
fonttools==4.
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
google-api-core==2.17.1
|
| 24 |
-
google-api-python-client==2.118.0
|
| 25 |
-
google-auth==2.28.0
|
| 26 |
-
google-auth-httplib2==0.2.0
|
| 27 |
-
googleapis-common-protos==1.62.0
|
| 28 |
-
httplib2==0.22.0
|
| 29 |
huggingface-hub==0.32.4
|
| 30 |
-
idna==3.
|
| 31 |
-
importlib_metadata
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
jedi
|
| 38 |
-
Jinja2==3.1.
|
| 39 |
joblib==1.4.2
|
| 40 |
jsonpickle==4.1.1
|
| 41 |
-
jupyter_client
|
| 42 |
-
jupyter_core
|
| 43 |
-
kiwisolver==1.4.
|
| 44 |
-
llvmlite @ file:///C:/b/abs_da51wefv9a/croot/llvmlite_1741209883316/work
|
| 45 |
MarkupSafe==2.1.5
|
| 46 |
-
|
| 47 |
-
matplotlib==
|
| 48 |
-
|
| 49 |
-
miditok==3.0.5.post1
|
| 50 |
-
mido==1.3.3
|
| 51 |
-
mkl-service==2.4.0
|
| 52 |
-
mkl_fft @ file:///C:/Users/dev-admin/mkl/mkl_fft_1730823082242/work
|
| 53 |
-
mkl_random @ file:///C:/Users/dev-admin/mkl/mkl_random_1730822522280/work
|
| 54 |
-
more-itertools==10.7.0
|
| 55 |
mpmath==1.3.0
|
| 56 |
-
|
| 57 |
-
music21==9.7.0
|
| 58 |
mypy-extensions==1.0.0
|
| 59 |
-
|
| 60 |
networkx==3.3
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
pyasn1-modules==0.3.0
|
| 76 |
-
pycparser==2.21
|
| 77 |
-
pygame==2.6.0
|
| 78 |
-
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1736243443484/work
|
| 79 |
-
PyNaCl==1.4.0
|
| 80 |
-
pyparsing==3.1.1
|
| 81 |
-
pySmartDL==1.3.4
|
| 82 |
-
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1733215673016/work
|
| 83 |
-
pywin32==308
|
| 84 |
PyYAML==6.0.2
|
| 85 |
-
pyzmq
|
| 86 |
requests==2.32.3
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
scikit-learn==1.6.1
|
| 90 |
-
scipy==1.15.2
|
| 91 |
-
setuptools==75.8.0
|
| 92 |
-
six==1.16.0
|
| 93 |
-
stack_data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1733569443808/work
|
| 94 |
sympy==1.13.3
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
torchaudio==2.7.0+cu126
|
| 100 |
-
torchvision==0.22.0+cu126
|
| 101 |
-
tornado @ file:///C:/b/abs_7cyu943ybx/croot/tornado_1733960510898/work
|
| 102 |
tqdm==4.67.1
|
| 103 |
-
traitlets
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
webcolors==24.11.1
|
| 111 |
-
wheel==0.45.1
|
| 112 |
-
yarl==1.9.4
|
| 113 |
-
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1732827521216/work
|
|
|
|
| 1 |
+
asttokens==3.0.0
|
| 2 |
+
backcall==0.2.0
|
| 3 |
+
blinker==1.8.2
|
| 4 |
+
certifi==2025.8.3
|
|
|
|
|
|
|
|
|
|
| 5 |
chardet==5.2.0
|
| 6 |
+
charset-normalizer==3.4.2
|
| 7 |
+
click==8.1.8
|
| 8 |
+
colorama==0.4.6
|
| 9 |
+
comm==0.2.3
|
| 10 |
+
contourpy==1.1.1
|
| 11 |
cycler==0.12.1
|
| 12 |
+
debugpy==1.8.15
|
| 13 |
+
decorator==5.2.1
|
| 14 |
+
executing==2.2.0
|
| 15 |
+
filelock==3.16.1
|
| 16 |
+
Flask==3.0.3
|
| 17 |
+
Flask-Cors==5.0.0
|
| 18 |
+
fonttools==4.57.0
|
| 19 |
+
fsspec==2025.3.0
|
| 20 |
+
-e git+https://github.com/ISLAND-IDs/HarmonyMIDIToken.git@8cdb44aeee4c5f5d6915cde7e7acab75f3f3d7fb#egg=harmony_midi_token
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
huggingface-hub==0.32.4
|
| 22 |
+
idna==3.10
|
| 23 |
+
importlib_metadata==8.5.0
|
| 24 |
+
importlib_resources==6.4.5
|
| 25 |
+
ipykernel==6.29.5
|
| 26 |
+
ipython==8.12.3
|
| 27 |
+
ipython_pygments_lexers==1.1.1
|
| 28 |
+
itsdangerous==2.2.0
|
| 29 |
+
jedi==0.19.2
|
| 30 |
+
Jinja2==3.1.6
|
| 31 |
joblib==1.4.2
|
| 32 |
jsonpickle==4.1.1
|
| 33 |
+
jupyter_client==8.6.3
|
| 34 |
+
jupyter_core==5.8.1
|
| 35 |
+
kiwisolver==1.4.7
|
|
|
|
| 36 |
MarkupSafe==2.1.5
|
| 37 |
+
matplotlib==3.7.5
|
| 38 |
+
matplotlib-inline==0.1.7
|
| 39 |
+
more-itertools==10.5.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
mpmath==1.3.0
|
| 41 |
+
music21==8.3.0
|
|
|
|
| 42 |
mypy-extensions==1.0.0
|
| 43 |
+
nest-asyncio==1.6.0
|
| 44 |
networkx==3.3
|
| 45 |
+
numpy==2.3.2
|
| 46 |
+
packaging==25.0
|
| 47 |
+
parso==0.8.4
|
| 48 |
+
pickleshare==0.7.5
|
| 49 |
+
pillow==10.4.0
|
| 50 |
+
platformdirs==4.3.6
|
| 51 |
+
prompt_toolkit==3.0.51
|
| 52 |
+
psutil==7.0.0
|
| 53 |
+
pure_eval==0.2.3
|
| 54 |
+
pychord==1.2.2
|
| 55 |
+
Pygments==2.19.2
|
| 56 |
+
pyparsing==3.1.4
|
| 57 |
+
python-dateutil==2.9.0.post0
|
| 58 |
+
pywin32==311
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
PyYAML==6.0.2
|
| 60 |
+
pyzmq==27.0.1
|
| 61 |
requests==2.32.3
|
| 62 |
+
six==1.17.0
|
| 63 |
+
stack-data==0.6.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
sympy==1.13.3
|
| 65 |
+
torch==2.7.1+cu128
|
| 66 |
+
torchaudio==2.7.1+cu128
|
| 67 |
+
torchvision==0.22.1+cu128
|
| 68 |
+
tornado==6.4.2
|
|
|
|
|
|
|
|
|
|
| 69 |
tqdm==4.67.1
|
| 70 |
+
traitlets==5.14.3
|
| 71 |
+
typing_extensions==4.13.2
|
| 72 |
+
urllib3==2.2.3
|
| 73 |
+
wcwidth==0.2.13
|
| 74 |
+
webcolors==24.8.0
|
| 75 |
+
Werkzeug==3.0.6
|
| 76 |
+
zipp==3.20.2
|
|
|
|
|
|
|
|
|
|
|
|
utillity/miditokenizer.py
DELETED
|
@@ -1,21 +0,0 @@
|
|
| 1 |
-
from miditok import REMI, TokSequence, TokenizerConfig
|
| 2 |
-
from symusic import Score
|
| 3 |
-
import os
|
| 4 |
-
|
| 5 |
-
# 토크나이저 설정
|
| 6 |
-
config = TokenizerConfig()
|
| 7 |
-
tokenizer = REMI(config) # REMI 토크나이저 사용
|
| 8 |
-
|
| 9 |
-
def get_midi_scores(midi_folder):
|
| 10 |
-
for filename in os.listdir(midi_folder):
|
| 11 |
-
if filename.endswith(".mid"):
|
| 12 |
-
yield Score(os.path.join(midi_folder, filename)), filename # 제네레이터로 코루틴 만들어서 이용
|
| 13 |
-
|
| 14 |
-
def tokenize_midi(midi):
|
| 15 |
-
tokens = tokenizer(midi)
|
| 16 |
-
return tokens[0].ids # type: ignore
|
| 17 |
-
|
| 18 |
-
def detokenize_midi(tokens: list[int]):
|
| 19 |
-
seq = TokSequence(ids=tokens) # type: ignore
|
| 20 |
-
midi = tokenizer.decode([seq])
|
| 21 |
-
return midi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|