Modificar README.md
This commit is contained in:
@@ -53,7 +53,7 @@ The project is being developed to support research into AI-generated image detec
|
||||
Clone the repository and install it in editable mode:
|
||||
|
||||
```bash
|
||||
git clone <your-repository-url>
|
||||
git clone https://gittea.kl3z00.com/kl3z/spectralforensics
|
||||
cd spectralforensics
|
||||
python -m pip install -e .
|
||||
```
|
||||
@@ -81,12 +81,7 @@ For a single image, `extract_features` returns a dictionary containing the file
|
||||
```python
|
||||
from spectralforensics import extract_features
|
||||
|
||||
data = extract_features(
|
||||
"images/",
|
||||
output_csv="spectral_features.csv",
|
||||
output="quantitative",
|
||||
)
|
||||
|
||||
data = extract_features("images/", output_csv="spectral_features.csv",output="quantitative")
|
||||
print(data.head())
|
||||
```
|
||||
|
||||
@@ -104,9 +99,7 @@ real_files = rename_real_images("dataset/real")
|
||||
generated_files = rename_generated_images("dataset/generated")
|
||||
```
|
||||
|
||||
The resulting filenames follow the `real1.jpg`, `real2.png`, `gen1.jpg`,
|
||||
and `gen2.png` patterns. Each function returns a list of the new paths.
|
||||
Renaming is non-recursive and preserves each image format.
|
||||
The resulting filenames follow the `real1.jpg`, `real2.png`, `gen1.jpg`, and `gen2.png` patterns. Each function returns a list of the new paths. Renaming is non-recursive and preserves each image format.
|
||||
|
||||
## Extraction modes
|
||||
|
||||
@@ -121,15 +114,14 @@ Use the `output` argument to control which results are calculated and returned:
|
||||
| `"quantitative"` | All numerical descriptors, without visual maps |
|
||||
| `"visual"` | Visual maps, without quantitative descriptors |
|
||||
|
||||
|
||||
The use `image_size` is set as default image_size=(255, 255); however, the module is designed to support other image dimensions.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
```python
|
||||
features = extract_features(
|
||||
"images/sample.jpg",
|
||||
image_size=(255, 255),
|
||||
high_freq_threshold=0.65,
|
||||
output="spectral",
|
||||
)
|
||||
features = extract_features("images/sample.jpg", image_size=(255, 255), high_freq_threshold=0.65, output="spectral", )
|
||||
```
|
||||
|
||||
If a filename contains `gen`, the generated-image target is set to `"0"`. If it contains `real`, the target is set to `"1"`; otherwise, the target is left as `None`.
|
||||
@@ -141,11 +133,7 @@ The plotting functions accept dictionaries, pandas `DataFrame` objects, and othe
|
||||
```python
|
||||
from spectralforensics import line_plot, scatter_plot
|
||||
|
||||
data = {
|
||||
"sample": [1, 2, 3, 4, 5],
|
||||
"spectral_entropy": [2.1, 2.5, 2.2, 2.9, 2.6],
|
||||
"anisotropy": [0.10, 0.30, 0.20, 0.40, 0.25],
|
||||
}
|
||||
data = {"sample": [1, 2, 3, 4, 5], "spectral_entropy": [2.1, 2.5, 2.2, 2.9, 2.6],"anisotropy": [0.10, 0.30, 0.20, 0.40, 0.25],}
|
||||
|
||||
line_plot(data, x="sample", y="spectral_entropy")
|
||||
scatter_plot(data, x="spectral_entropy", y="anisotropy")
|
||||
@@ -218,10 +206,10 @@ SpectralForensics is intended as a research and experimentation toolkit. Extract
|
||||
|
||||
## Authors
|
||||
|
||||
- Jose Garcia
|
||||
- Patricio Rodrigues
|
||||
- Carlos Grilo
|
||||
- Rolando Miragaia
|
||||
- Jose Garcia - University of Leiria and Oeste (ULO)
|
||||
- Patricio Rodrigues - University of Leiria and Oeste (ULO)
|
||||
- Carlos Grilo - University of Leiria and Oeste (ULO)
|
||||
- Rolando Miragaia - University of Leiria and Oeste (ULO)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user