raman-data 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- raman_data-0.0.1/.github/workflows/ci.yml +65 -0
- raman_data-0.0.1/.gitignore +210 -0
- raman_data-0.0.1/.idea/.gitignore +8 -0
- raman_data-0.0.1/LICENSE +21 -0
- raman_data-0.0.1/PKG-INFO +155 -0
- raman_data-0.0.1/README.md +99 -0
- raman_data-0.0.1/demo.ipynb +307 -0
- raman_data-0.0.1/pyproject.toml +38 -0
- raman_data-0.0.1/raman_data/__init__.py +43 -0
- raman_data-0.0.1/raman_data/datasets.py +83 -0
- raman_data-0.0.1/raman_data/exceptions.py +31 -0
- raman_data-0.0.1/raman_data/loaders/HugLoader.py +170 -0
- raman_data-0.0.1/raman_data/loaders/ILoader.py +86 -0
- raman_data-0.0.1/raman_data/loaders/KagLoader.py +274 -0
- raman_data-0.0.1/raman_data/loaders/LoaderTools.py +286 -0
- raman_data-0.0.1/raman_data/loaders/ZenLoader.py +303 -0
- raman_data-0.0.1/raman_data/loaders/ZipLoader.py +162 -0
- raman_data-0.0.1/raman_data/loaders/__init__.py +10 -0
- raman_data-0.0.1/raman_data/types.py +134 -0
- raman_data-0.0.1/raman_data.egg-info/PKG-INFO +155 -0
- raman_data-0.0.1/raman_data.egg-info/SOURCES.txt +26 -0
- raman_data-0.0.1/raman_data.egg-info/dependency_links.txt +1 -0
- raman_data-0.0.1/raman_data.egg-info/requires.txt +40 -0
- raman_data-0.0.1/raman_data.egg-info/top_level.txt +1 -0
- raman_data-0.0.1/requirements.txt +37 -0
- raman_data-0.0.1/setup.cfg +4 -0
- raman_data-0.0.1/tests/test_loaders.py +42 -0
- raman_data-0.0.1/tests/test_raman_data.py +73 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Python Package CI and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
tags: ["v*.*.*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0 # needed for setuptools-scm
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v4
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install -r requirements.txt
|
|
31
|
+
pip install .[test]
|
|
32
|
+
|
|
33
|
+
- name: Test with pytest
|
|
34
|
+
run: |
|
|
35
|
+
pytest
|
|
36
|
+
|
|
37
|
+
publish:
|
|
38
|
+
needs: test
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
41
|
+
permissions:
|
|
42
|
+
id-token: write # required for trusted publishing
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
with:
|
|
46
|
+
fetch-depth: 0 # needed for setuptools-scm
|
|
47
|
+
|
|
48
|
+
- name: Set up Python
|
|
49
|
+
uses: actions/setup-python@v4
|
|
50
|
+
with:
|
|
51
|
+
python-version: "3.11"
|
|
52
|
+
|
|
53
|
+
- name: Install build dependencies
|
|
54
|
+
run: |
|
|
55
|
+
python -m pip install --upgrade pip
|
|
56
|
+
pip install build
|
|
57
|
+
|
|
58
|
+
- name: Build package
|
|
59
|
+
run: python -m build
|
|
60
|
+
|
|
61
|
+
- name: Publish package to PyPI
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
63
|
+
with:
|
|
64
|
+
user: __token__
|
|
65
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
# IDE
|
|
210
|
+
.idea/
|
raman_data-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ml-lab-htw
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: raman-data
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A unified Python package for accessing various Raman spectroscopy datasets.
|
|
5
|
+
Author-email: Mario Koddenbrock <mario.koddenbrock@htw-berlin.de>, Oskar Fulde <Oskar.Fulde@Student.HTW-Berlin.de>, Robert Koch <Robert.Koch@Student.HTW-Berlin.de>
|
|
6
|
+
Project-URL: Homepage, https://github.com/ml-lab-htw/raman_data
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/ml-lab-htw/raman_data/issues
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: aiohappyeyeballs==2.6.1
|
|
17
|
+
Requires-Dist: aiohttp==3.12.15
|
|
18
|
+
Requires-Dist: aiosignal==1.4.0
|
|
19
|
+
Requires-Dist: attrs==25.3.0
|
|
20
|
+
Requires-Dist: certifi==2025.8.3
|
|
21
|
+
Requires-Dist: charset-normalizer==3.4.3
|
|
22
|
+
Requires-Dist: colorama==0.4.6
|
|
23
|
+
Requires-Dist: datasets==4.0.0
|
|
24
|
+
Requires-Dist: dill==0.3.8
|
|
25
|
+
Requires-Dist: filelock==3.19.1
|
|
26
|
+
Requires-Dist: frozenlist==1.7.0
|
|
27
|
+
Requires-Dist: fsspec==2025.3.0
|
|
28
|
+
Requires-Dist: hf-xet==1.1.10
|
|
29
|
+
Requires-Dist: h5py==3.14.0
|
|
30
|
+
Requires-Dist: huggingface-hub==0.34.4
|
|
31
|
+
Requires-Dist: idna==3.10
|
|
32
|
+
Requires-Dist: kagglehub==0.3.13
|
|
33
|
+
Requires-Dist: multidict==6.6.4
|
|
34
|
+
Requires-Dist: multiprocess==0.70.16
|
|
35
|
+
Requires-Dist: numpy==2.3.2
|
|
36
|
+
Requires-Dist: openpyxl==3.1.5
|
|
37
|
+
Requires-Dist: packaging==25.0
|
|
38
|
+
Requires-Dist: pandas==2.3.2
|
|
39
|
+
Requires-Dist: propcache==0.3.2
|
|
40
|
+
Requires-Dist: pyarrow==21.0.0
|
|
41
|
+
Requires-Dist: python-dateutil==2.9.0.post0
|
|
42
|
+
Requires-Dist: pytz==2025.2
|
|
43
|
+
Requires-Dist: PyYAML==6.0.2
|
|
44
|
+
Requires-Dist: requests==2.32.5
|
|
45
|
+
Requires-Dist: six==1.17.0
|
|
46
|
+
Requires-Dist: scipy==1.16.3
|
|
47
|
+
Requires-Dist: tqdm==4.67.1
|
|
48
|
+
Requires-Dist: typing_extensions==4.15.0
|
|
49
|
+
Requires-Dist: tzdata==2025.2
|
|
50
|
+
Requires-Dist: urllib3==2.5.0
|
|
51
|
+
Requires-Dist: xxhash==3.5.0
|
|
52
|
+
Requires-Dist: yarl==1.20.1
|
|
53
|
+
Provides-Extra: test
|
|
54
|
+
Requires-Dist: pytest; extra == "test"
|
|
55
|
+
Dynamic: license-file
|
|
56
|
+
|
|
57
|
+
# Raman-Data: A Unified Python Library for Raman Spectroscopy Datasets
|
|
58
|
+
|
|
59
|
+
This project aims to create a unified Python package for accessing various Raman spectroscopy datasets. The goal is to provide a simple and consistent API to load data from different sources like Kaggle, Hugging Face, GitHub, and Zenodo. This will be beneficial for the Raman spectroscopy community, enabling easier evaluation of models, such as foundation models for Raman spectroscopy.
|
|
60
|
+
|
|
61
|
+
## ✨ Features
|
|
62
|
+
|
|
63
|
+
- A single, easy-to-use Python package (planned for PyPI).
|
|
64
|
+
- Automatic downloading and caching of datasets from their original sources.
|
|
65
|
+
- A unified data format for all datasets.
|
|
66
|
+
- A simple function to list available datasets, with filtering options.
|
|
67
|
+
|
|
68
|
+
## 🚀 Getting Started
|
|
69
|
+
|
|
70
|
+
The basic interface for the package is defined in `raman_data/__init__.py`. Here's a preview of how it will work:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from raman_data import raman_data
|
|
74
|
+
# To specify a task type import this enum as well
|
|
75
|
+
from raman_data import TASK_TYPE
|
|
76
|
+
|
|
77
|
+
# List all available datasets
|
|
78
|
+
print(raman_data())
|
|
79
|
+
|
|
80
|
+
# List only classification datasets
|
|
81
|
+
print(raman_data(task_type=TASK_TYPE.Classification))
|
|
82
|
+
|
|
83
|
+
# Load a dataset
|
|
84
|
+
dataset = raman_data(name="codina/diabetes/AGEs")
|
|
85
|
+
|
|
86
|
+
# Access the data, targets, and metadata
|
|
87
|
+
X = dataset.data
|
|
88
|
+
y = dataset.target
|
|
89
|
+
metadata = dataset.metadata
|
|
90
|
+
|
|
91
|
+
print(X.shape)
|
|
92
|
+
print(y.shape)
|
|
93
|
+
print(metadata)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For more detailed examples see [Demo Notebook](./demo.ipynb).
|
|
97
|
+
|
|
98
|
+
## 📚 Available Datasets
|
|
99
|
+
|
|
100
|
+
Here is the list of datasets that are currently included in the package:
|
|
101
|
+
|
|
102
|
+
### Kaggle
|
|
103
|
+
- [Diabetes Spectroscopy](https://www.kaggle.com/datasets/codina/raman-spectroscopy-of-diabetes)
|
|
104
|
+
- [Liquid Chromatography](https://www.kaggle.com/datasets/sergioalejandrod/raman-spectroscopy)
|
|
105
|
+
|
|
106
|
+
### Hugging Face
|
|
107
|
+
- [Substrate Mix Raman](https://huggingface.co/datasets/chlange/SubstrateMixRaman)
|
|
108
|
+
- [Ecoli Fermentation](https://huggingface.co/datasets/chlange/RamanSpectraEcoliFermentation)
|
|
109
|
+
- [Fuel Spectra Benchtop](https://huggingface.co/datasets/chlange/FuelRamanSpectraBenchtop)
|
|
110
|
+
|
|
111
|
+
### Zenodo
|
|
112
|
+
- [Hyperspectral Unmixing](https://zenodo.org/records/10779223)
|
|
113
|
+
- [Mutant Wheat Lines](https://zenodo.org/records/7644521)
|
|
114
|
+
- [Surface Enhanced Spectroscopy for quantitative analysis](https://zenodo.org/records/3572359)
|
|
115
|
+
|
|
116
|
+
## 🎯 Milestones
|
|
117
|
+
|
|
118
|
+
- [x] View Datasets
|
|
119
|
+
- [x] Software architecture with dummy data
|
|
120
|
+
- [x] Software tests
|
|
121
|
+
- [x] Integration of Kaggle
|
|
122
|
+
- [x] Integration of Huggingface
|
|
123
|
+
- [x] Integration of Github
|
|
124
|
+
- [x] Integration of Zenodo
|
|
125
|
+
- [ ] Integration of other datasets
|
|
126
|
+
- [ ] Finalize Package
|
|
127
|
+
- [ ] Documentation
|
|
128
|
+
- [ ] Publish to PyPi
|
|
129
|
+
|
|
130
|
+
## 🔮 For Later (Future Datasets)
|
|
131
|
+
|
|
132
|
+
### Kaggle
|
|
133
|
+
- [Cancer Cells SERS Spectra](https://www.kaggle.com/code/mathiascharconnet/cancer-cells-sers-spectra) (requires authentification)
|
|
134
|
+
|
|
135
|
+
### GitHub
|
|
136
|
+
- [Raman Spectra Data](https://github.com/MIND-Lab/Raman-Spectra-Data)
|
|
137
|
+
- [Raman spectra of pathogenic bacteria](https://www.dropbox.com/scl/fo/fb29ihfnvishuxlnpgvhg/AJToUtts-vjYdwZGeqK4k-Y?rlkey=r4p070nsuei6qj3pjp13nwf6l&e=2&dl=0)
|
|
138
|
+
(_more info on [this GitHub page](https://github.com/csho33/bacteria-ID)_)
|
|
139
|
+
- [High-throughput molecular imaging](https://github.com/conor-horgan/DeepeR?tab=readme-ov-file#dataset)
|
|
140
|
+
- [spectrai raman spectra](https://github.com/conor-horgan/spectrai)
|
|
141
|
+
|
|
142
|
+
### Zenodo
|
|
143
|
+
- [Quantitative volumetric Raman imaging](https://zenodo.org/records/256329)
|
|
144
|
+
|
|
145
|
+
### Other Sources
|
|
146
|
+
- [Spectra of illicit adulterants](https://data.mendeley.com/datasets/y4md8znppn/1)
|
|
147
|
+
- [Raman Spectrum Matching with Contrastive Representation Learning](https://data.dtu.dk/articles/dataset/Datasets_for_replicating_the_paper_Raman_Spectrum_Matching_with_Contrastive_Representation_Learning_/20222331?file=36144495)
|
|
148
|
+
- [Raman spectra of chemical compounds](https://springernature.figshare.com/articles/dataset/Open-source_Raman_spectra_of_chemical_compounds_for_active_pharmaceutical_ingredient_development/27931131)
|
|
149
|
+
- [Inline Raman Spectroscopy and Indirect Hard Modeling](https://publications.rwth-aachen.de/record/978266/files/)
|
|
150
|
+
- [The Effect of Sulfate Electrolytes on the Liquid-Liquid Equilibrium](https://publications.rwth-aachen.de/record/978265/files/)
|
|
151
|
+
- [In-line Monitoring of Microgel Synthesis](https://publications.rwth-aachen.de/record/834113/files/) (_weird format_)
|
|
152
|
+
- [N-isopropylacrylamide Microgel Synthesis](https://publications.rwth-aachen.de/record/959050/files/)
|
|
153
|
+
- [Nonlinear Manifold Learning Determines Microgel Size from Raman Spectroscopy](https://publications.rwth-aachen.de/record/959137)
|
|
154
|
+
- [NASA AHEAD](https://ahed.nasa.gov/datasets/f5b6051bfeb18c5a7eaef6504582)
|
|
155
|
+
- [RRUFF](https://rruff.info/)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Raman-Data: A Unified Python Library for Raman Spectroscopy Datasets
|
|
2
|
+
|
|
3
|
+
This project aims to create a unified Python package for accessing various Raman spectroscopy datasets. The goal is to provide a simple and consistent API to load data from different sources like Kaggle, Hugging Face, GitHub, and Zenodo. This will be beneficial for the Raman spectroscopy community, enabling easier evaluation of models, such as foundation models for Raman spectroscopy.
|
|
4
|
+
|
|
5
|
+
## ✨ Features
|
|
6
|
+
|
|
7
|
+
- A single, easy-to-use Python package (planned for PyPI).
|
|
8
|
+
- Automatic downloading and caching of datasets from their original sources.
|
|
9
|
+
- A unified data format for all datasets.
|
|
10
|
+
- A simple function to list available datasets, with filtering options.
|
|
11
|
+
|
|
12
|
+
## 🚀 Getting Started
|
|
13
|
+
|
|
14
|
+
The basic interface for the package is defined in `raman_data/__init__.py`. Here's a preview of how it will work:
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
from raman_data import raman_data
|
|
18
|
+
# To specify a task type import this enum as well
|
|
19
|
+
from raman_data import TASK_TYPE
|
|
20
|
+
|
|
21
|
+
# List all available datasets
|
|
22
|
+
print(raman_data())
|
|
23
|
+
|
|
24
|
+
# List only classification datasets
|
|
25
|
+
print(raman_data(task_type=TASK_TYPE.Classification))
|
|
26
|
+
|
|
27
|
+
# Load a dataset
|
|
28
|
+
dataset = raman_data(name="codina/diabetes/AGEs")
|
|
29
|
+
|
|
30
|
+
# Access the data, targets, and metadata
|
|
31
|
+
X = dataset.data
|
|
32
|
+
y = dataset.target
|
|
33
|
+
metadata = dataset.metadata
|
|
34
|
+
|
|
35
|
+
print(X.shape)
|
|
36
|
+
print(y.shape)
|
|
37
|
+
print(metadata)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For more detailed examples see [Demo Notebook](./demo.ipynb).
|
|
41
|
+
|
|
42
|
+
## 📚 Available Datasets
|
|
43
|
+
|
|
44
|
+
Here is the list of datasets that are currently included in the package:
|
|
45
|
+
|
|
46
|
+
### Kaggle
|
|
47
|
+
- [Diabetes Spectroscopy](https://www.kaggle.com/datasets/codina/raman-spectroscopy-of-diabetes)
|
|
48
|
+
- [Liquid Chromatography](https://www.kaggle.com/datasets/sergioalejandrod/raman-spectroscopy)
|
|
49
|
+
|
|
50
|
+
### Hugging Face
|
|
51
|
+
- [Substrate Mix Raman](https://huggingface.co/datasets/chlange/SubstrateMixRaman)
|
|
52
|
+
- [Ecoli Fermentation](https://huggingface.co/datasets/chlange/RamanSpectraEcoliFermentation)
|
|
53
|
+
- [Fuel Spectra Benchtop](https://huggingface.co/datasets/chlange/FuelRamanSpectraBenchtop)
|
|
54
|
+
|
|
55
|
+
### Zenodo
|
|
56
|
+
- [Hyperspectral Unmixing](https://zenodo.org/records/10779223)
|
|
57
|
+
- [Mutant Wheat Lines](https://zenodo.org/records/7644521)
|
|
58
|
+
- [Surface Enhanced Spectroscopy for quantitative analysis](https://zenodo.org/records/3572359)
|
|
59
|
+
|
|
60
|
+
## 🎯 Milestones
|
|
61
|
+
|
|
62
|
+
- [x] View Datasets
|
|
63
|
+
- [x] Software architecture with dummy data
|
|
64
|
+
- [x] Software tests
|
|
65
|
+
- [x] Integration of Kaggle
|
|
66
|
+
- [x] Integration of Huggingface
|
|
67
|
+
- [x] Integration of Github
|
|
68
|
+
- [x] Integration of Zenodo
|
|
69
|
+
- [ ] Integration of other datasets
|
|
70
|
+
- [ ] Finalize Package
|
|
71
|
+
- [ ] Documentation
|
|
72
|
+
- [ ] Publish to PyPi
|
|
73
|
+
|
|
74
|
+
## 🔮 For Later (Future Datasets)
|
|
75
|
+
|
|
76
|
+
### Kaggle
|
|
77
|
+
- [Cancer Cells SERS Spectra](https://www.kaggle.com/code/mathiascharconnet/cancer-cells-sers-spectra) (requires authentification)
|
|
78
|
+
|
|
79
|
+
### GitHub
|
|
80
|
+
- [Raman Spectra Data](https://github.com/MIND-Lab/Raman-Spectra-Data)
|
|
81
|
+
- [Raman spectra of pathogenic bacteria](https://www.dropbox.com/scl/fo/fb29ihfnvishuxlnpgvhg/AJToUtts-vjYdwZGeqK4k-Y?rlkey=r4p070nsuei6qj3pjp13nwf6l&e=2&dl=0)
|
|
82
|
+
(_more info on [this GitHub page](https://github.com/csho33/bacteria-ID)_)
|
|
83
|
+
- [High-throughput molecular imaging](https://github.com/conor-horgan/DeepeR?tab=readme-ov-file#dataset)
|
|
84
|
+
- [spectrai raman spectra](https://github.com/conor-horgan/spectrai)
|
|
85
|
+
|
|
86
|
+
### Zenodo
|
|
87
|
+
- [Quantitative volumetric Raman imaging](https://zenodo.org/records/256329)
|
|
88
|
+
|
|
89
|
+
### Other Sources
|
|
90
|
+
- [Spectra of illicit adulterants](https://data.mendeley.com/datasets/y4md8znppn/1)
|
|
91
|
+
- [Raman Spectrum Matching with Contrastive Representation Learning](https://data.dtu.dk/articles/dataset/Datasets_for_replicating_the_paper_Raman_Spectrum_Matching_with_Contrastive_Representation_Learning_/20222331?file=36144495)
|
|
92
|
+
- [Raman spectra of chemical compounds](https://springernature.figshare.com/articles/dataset/Open-source_Raman_spectra_of_chemical_compounds_for_active_pharmaceutical_ingredient_development/27931131)
|
|
93
|
+
- [Inline Raman Spectroscopy and Indirect Hard Modeling](https://publications.rwth-aachen.de/record/978266/files/)
|
|
94
|
+
- [The Effect of Sulfate Electrolytes on the Liquid-Liquid Equilibrium](https://publications.rwth-aachen.de/record/978265/files/)
|
|
95
|
+
- [In-line Monitoring of Microgel Synthesis](https://publications.rwth-aachen.de/record/834113/files/) (_weird format_)
|
|
96
|
+
- [N-isopropylacrylamide Microgel Synthesis](https://publications.rwth-aachen.de/record/959050/files/)
|
|
97
|
+
- [Nonlinear Manifold Learning Determines Microgel Size from Raman Spectroscopy](https://publications.rwth-aachen.de/record/959137)
|
|
98
|
+
- [NASA AHEAD](https://ahed.nasa.gov/datasets/f5b6051bfeb18c5a7eaef6504582)
|
|
99
|
+
- [RRUFF](https://rruff.info/)
|