Skip to content

Commit

Permalink
Merge pull request #40 from fraunhoferportugal/dev
Browse files Browse the repository at this point in the history
Patch version 0.1.8
  • Loading branch information
ivo-facoco authored Feb 21, 2025
2 parents 24dd47d + f496465 commit 1c56ce4
Show file tree
Hide file tree
Showing 16 changed files with 400 additions and 325 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,35 @@
All notable changes to this project will be documented in this file.
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.1.8] - 2025-02-21
Minor patch release with Time Series standardization and documentation updates.

### Changed
- Introduced `BaseTSExtractor` torch module for time_series
- Loading TSFEL config on class instanciation

### Fixed
- Removed input layer logic from time_series example notebook (should not use internal methods or classes)


## [0.1.7] - 2025-01-31
Minor patch release with reduced dependency tree and documentaion updates.

### Added
- `convert_grayscale` option in `PSNR`metric
- Explicitely listing `SSIM` and `MSSIM` params
- Non deterministic warning for MSID documentation

### Changed
- Renamed `MSSIM` to `MSSSIM`
- GIQA documentation to indicate QS and DS as in paper
- Removed unnecessary torchmetrics dependency for image

### Fixed
- Added `np.isclose` verification in hypersphere estimation functions for synthetic evaluation


## [0.1.6] - 2024-12-10
Minor patch release with new image features extraction method and documentation updates.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ setup-all:
@echo -e "$(INFO) Creating development virtual environment...$(TERMINATOR)" && \
python3 -m venv .venv-dev && \
source .venv-dev/bin/activate && \
pip install -U poetry<2.0.0 && \
pip install -U "poetry<2.0.0" && \
poetry run pip install --upgrade pip setuptools && \
poetry install --with dev --all-extras && \
echo -e "$(SUCCESS) Virtual environment created successfully!$(TERMINATOR)" && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Depending on the data modality you want to use, you may need to install addition
```bash
pip install "pymdma[image] @ git+https://github.com/fraunhoferportugal/pymdma.git" # image dependencies
pip install "pymdma[tabular] @ git+https://github.com/fraunhoferportugal/pymdma.git" # tabular dependencies
pip install "pymdma[tabular] @ git+https://github.com/fraunhoferportugal/pymdma.git" # time series dependencies
pip install "pymdma[time_series] @ git+https://github.com/fraunhoferportugal/pymdma.git" # time series dependencies
```

For a minimal installation, you can install the package without CUDA support by forcing pip to install torch from the CPU index with the `--find-url` command.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.7
0.1.8
13 changes: 5 additions & 8 deletions notebooks/image_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install \"pymdma[image] @ https://github.com/fraunhoferportugal/pymdma.git\" --extra-index-url \"https://download.pytorch.org/whl/cpu/torch_stable.html\""
"%pip install \"pymdma[image]\" --extra-index-url \"https://download.pytorch.org/whl/cpu/torch_stable.html\""
]
},
{
Expand Down Expand Up @@ -260,6 +260,7 @@
" distorted.append((dst).astype(np.uint8))\n",
" return [np.array(x) for x in distorted]\n",
"\n",
"\n",
"distorted = generate_full_ref_dataset(dataset)\n",
"\n",
"mssim = MSSSIM()\n",
Expand Down Expand Up @@ -315,17 +316,15 @@
"\n",
"from pymdma.image.models.features import ExtractorFactory\n",
"\n",
"N_SAMPLES = 2000\n",
"random.seed(10)\n",
"\n",
"cifake_test_path = cifake_path / \"test\"\n",
"test_images_ref = Path(cifake_test_path / \"REAL\") # real images\n",
"test_images_synth = Path(cifake_test_path / \"FAKE\") # synthetic images\n",
"\n",
"images_ref = [img for img in test_images_ref.iterdir() if img.is_file()]\n",
"images_synth = [img for img in test_images_synth.iterdir() if img.is_file()]\n",
"\n",
"# images_ref = random.sample([img for img in test_images_ref.iterdir() if img.is_file()], 5000)\n",
"# images_synth = random.sample([img for img in test_images_synth.iterdir() if img.is_file()], 5000)\n",
"images_ref = [img for img in test_images_ref.iterdir() if img.is_file()][:N_SAMPLES]\n",
"images_synth = [img for img in test_images_synth.iterdir() if img.is_file()][:N_SAMPLES]\n",
"\n",
"extractor = ExtractorFactory.model_from_name(name=\"dino_vits8\")\n",
"ref_features = extractor.extract_features_from_files(images_ref)\n",
Expand Down Expand Up @@ -446,8 +445,6 @@
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"giqa_result.plot(\"GIQA\", bins=50)\n",
"plt.xlabel(\"Score\")\n",
"plt.ylabel(\"Frequency\")\n",
Expand Down
Loading

0 comments on commit 1c56ce4

Please sign in to comment.