The dataset viewer is not available for this subset.
Exception: SplitsNotFoundError
Message: The split names could not be parsed from the dataset config.
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 286, in get_dataset_config_info
for split_generator in builder._split_generators(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 91, in _split_generators
pa_table = next(iter(self._generate_tables(**splits[0].gen_kwargs, allow_full_read=False)))[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 193, in _generate_tables
examples = [ujson_loads(line) for line in batch.splitlines()]
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/utils/json.py", line 20, in ujson_loads
return pd.io.json.ujson_loads(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Expected object or value
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 65, in compute_split_names_from_streaming_response
for split in get_dataset_split_names(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 340, in get_dataset_split_names
info = get_dataset_config_info(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 291, in get_dataset_config_info
raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
This benchmark is bulit on GEdit-Bench and ImgEdit-Bench, more information can be found in their homepages.
Installation
This evaluation does not require complex packages. If your existing environments miss some, please install them.
pip install torch torchvision
pip install numpy Pillow scikit-image tqdm
Structure of the Benchmarks
GEdit-Bench:
The samples of different editing types are under the fullset folder. Each sample of the original benchmark has a corresponding mask. The structure of the files are shown below.
geditbench/
- fullset/
- color_alter/
- en/
- 0d6038e1736440c2fb8384b4bf495e13_mask.png
- 0d6038e1736440c2fb8384b4bf495e13.png
- ...
- ...
- metafile_geditbench.json
- run_psnr_score.py
ImgEdit-Bench:
The samples of different editing types are under the singleturn folder. Each sample of the original benchmark has a corresponding mask. The structure of the files are shown below.
imgedit/
- singleturn/
- animal/
- 000000265_mask.png
- 000000265.png
- ...
- ...
- metafile_imgeditbench.json
- run_psnr_score.py
Usage
First you should generate your own results of these benchmarks. To directly use our run_psnr_score.py, make sure your results are saved follow the correct structure.
For GEdit-Bench, the results should be saved as
result_model_0/
- fullset/
- color_alter/
- en/
- 0d6038e1736440c2fb8384b4bf495e13.png
- ...
- ...
For ImgEdit-Bench, the results should be saved as
result_model_0/
- 22.png
- 23.png
- ...
Then run the script to obtain the PSNR and SSIM.
python run_psnr_score.py --results_dir result_model_0
You will find a psnr_ssim.json under results_score/result_model_0. All the values are saved and the mean value is at the bottom of the json file.
- Downloads last month
- 19