From 29e6355413cc61cf7c1d6434507497c35c7d81d3 Mon Sep 17 00:00:00 2001 From: kl3z Date: Tue, 27 Oct 2026 17:41:17 +0000 Subject: [PATCH] Modificar README.md --- README.md | 75 +++++++++++-------------------------------------------- 1 file changed, 15 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 692503c..f55a336 100644 --- a/README.md +++ b/README.md @@ -90,11 +90,7 @@ mode for backward compatibility with the current library. ```python from spectralforensics import extract_rgb_features -rgb_features = extract_rgb_features( - "images/sample.jpg", - output="quantitative", -) - +rgb_features = extract_rgb_features("images/sample.jpg",output="quantitative",) print(rgb_features["color_mode"]) print(rgb_features["spectral_entropy"]) print(rgb_features["mean_gradient"]) @@ -106,11 +102,7 @@ print(rgb_features["residual_noise_std_global"]) ```python from spectralforensics import extract_grayscale_features -grayscale_features = extract_grayscale_features( - "images/sample.jpg", - output="quantitative", -) - +grayscale_features = extract_grayscale_features("images/sample.jpg",output="quantitative",) print(grayscale_features["color_mode"]) print(grayscale_features["spectral_entropy"]) print(grayscale_features["mean_gradient"]) @@ -125,19 +117,8 @@ the requested descriptors. ```python from spectralforensics import extract_features -rgb_data = extract_features( - "images/", - color_mode="rgb", - output="quantitative", - output_csv="rgb_features.csv", -) - -grayscale_data = extract_features( - "images/", - color_mode="grayscale", - output="quantitative", - output_csv="grayscale_features.csv", -) +rgb_data = extract_features("images/",color_mode="rgb",output="quantitative",output_csv="rgb_features.csv",) +grayscale_data = extract_features("images/",color_mode="grayscale",output="quantitative",output_csv="grayscale_features.csv",) ``` For a folder, `extract_features` returns a pandas `DataFrame`. Folder traversal @@ -293,11 +274,7 @@ other inputs supported by `pandas.DataFrame`. ```python from spectralforensics import box_plot, line_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") box_plot(data, x="sample", y="anisotropy") @@ -309,33 +286,15 @@ box_plot(data, x="sample", y="anisotropy") Available plotting functions: ```python -from spectralforensics import ( - bar_plot, - box_plot, - correlation_plot, - line_plot, - scatter_plot, -) +from spectralforensics import (bar_plot,box_plot,correlation_plot,line_plot,scatter_plot,) ``` ### Correlation analysis ```python from spectralforensics import correlation_plot - -correlation_data = { - "spectral_entropy": [2.1, 2.5, 2.2, 2.9, 2.6], - "anisotropy": [0.10, 0.30, 0.20, 0.40, 0.25], - "target": [0, 1, 0, 1, 1], -} - -correlation_plot( - correlation_data, - correlation_columns=["spectral_entropy", "anisotropy", "target"], - method="pearson", - target="target", - kind="barh", -) +correlation_data = {"spectral_entropy": [2.1, 2.5, 2.2, 2.9, 2.6],"anisotropy": [0.10, 0.30, 0.20, 0.40, 0.25],"target": [0, 1, 0, 1, 1],} +correlation_plot(correlation_data,correlation_columns=["spectral_entropy", "anisotropy", "target"],method="pearson",target="target",kind="barh",) ``` ![SpectralForensics correlation plot](img/correlation.jpg) @@ -387,23 +346,19 @@ spectralforensics/ ## Research scope -SpectralForensics is a research and experimentation toolkit. Its descriptors -can support statistical analysis and machine-learning models, but they should -not be treated as standalone proof that an image is authentic or generated. +SpectralForensics is a research and experimentation toolkit. Its descriptors can support statistical analysis and machine-learning models, but they should not be treated as standalone proof that an image is authentic or generated. ## 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 -Issues, suggestions, and contributions are welcome. For substantial changes, -open an issue first to discuss the approach and its impact on the public API. +Contribuições? ## Citation -If you use SpectralForensics in academic work, cite the repository. A formal -citation and publication reference will be added as the project matures. +Artigo?