Skip to content

Commit

Permalink
Enhancements and bug fixes (#469)
Browse files Browse the repository at this point in the history
* Improved explanation for the synthetic image detection + refactoring

* Fixed lint errors, removed KarmaDecay #449

* Added LDM RINE and ProGAN RINE algorithms

* Re-added error message for when the API doesn't return the reports

* Sanitized percentages, fixed url handling, changed detection and ui thresholds

* Updated offline translation

* Fixed bing reverse search for urls, added Chrome types, bumped to 0.79.1

* Bumped version

* Updated offline translation

* Fixed csv sna path

* Added displaying error per algorithm

* Enhanced error display
  • Loading branch information
Sallaa authored May 2, 2024
1 parent 8cf565c commit b9e7f0c
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 83 deletions.
32 changes: 30 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weverify-plugin",
"version": "0.79.0",
"version": "0.79.1",
"description": "",
"main": "index.js",
"scripts": {
Expand All @@ -23,6 +23,7 @@
"@mui/material": "^5.14.12",
"@mui/x-date-pickers": "^6.16.1",
"@reduxjs/toolkit": "^1.9.7",
"@types/chrome": "^0.0.266",
"@wavesurfer/react": "^1.0.4",
"axios": "^1.5.1",
"d3-selection": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion public/locales/ar/components/NavItems/tools/Forensic.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/locales/en/components/NavItems/tools/Forensic.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"synthetic_image_detection_label": "Media link", "synthetic_image_detection_name": "Synthetic Image Detection", "synthetic_image_detection_placeholder": "Paste the URL here", "synthetic_image_detection_results": "Results of the clip selected", "synthetic_image_detection_link": "Image link", "synthetic_image_detection_gan_name": "GAN", "synthetic_image_detection_gan_description": "This method aims to detect if the image has been generated by a Generative Adversarial Network (GAN).", "synthetic_image_detection_diffusion_name": "Diffusion model", "synthetic_image_detection_diffusion_description": "This method aims to detect if the image has been generated through a diffusion model neural network.", "synthetic_image_detection_progan_name": "ProGAN", "synthetic_image_detection_progan_description": "This model can detect fully synthetic images generated by ProGAN Models or architectures that are similar. The model's architecture is a variant of ResNet50, including an initial layer for residual extraction and with no downsampling in the first layer. The model is not pretrained and strong augmentations are carried out including blurring, compression, gaussian noise adding, geometric transformations, cut-out, and brightness and contrast changes.", "synthetic_image_detection_adm_name": " ADM", "synthetic_image_detection_adm_description": "This model can detect fully synthetic images generated by ADMs or architectures that are similar. The model's architecture is a variant of ResNet50, including an initial layer for residual extraction and with no downsampling in the first layer. The model is not pretrained and strong augmentations are carried out including blurring, compression, gaussian noise adding, geometric transformations, cut-out, and brightness and contrast changes.", "synthetic_image_detection_progan_rine_mever_name": "ProGAN RINE", "synthetic_image_detection_progan_rine_mever_description": "This model can detect fully synthetic images generated by ProGAN Models or architectures that are similar. CLIP (Contrastive Language-Image Pre-training) technology extracts key characteristics from the image.", "synthetic_image_detection_ldm_rine_mever_name": "LDM RINE", "synthetic_image_detection_ldm_rine_mever_description": "This model can detect fully synthetic images generated by Latent Diffusion Models (LDM). CLIP (Contrastive Language-Image Pre-training) technology extracts key characteristics from the image.", "synthetic_image_detection_title": "Detection results", "synthetic_image_detection_alert": "This image has been detected as generated with a ", "synthetic_image_detection_alert_2": " algorithm", "synthetic_image_detection_error_400": "Error: Invalid image link. Ensure it points to a publicly accessible image with dimensions between 128x128 and 2000x2000 pixels.", "synthetic_image_detection_error_generic": "An error happened. Please try again or try a different image", "synthetic_image_detection_not_found": "No detection found", "submit_button": "Submit", "button_localfile": "Local file", "synthetic_image_detection_gauge_detection": "Detection", "synthetic_image_detection_gauge_no_detection": "No detection", "synthetic_image_detection_additional_explanation_text": "Tip: A result above 70% indicates that an image is highly probable to have been generated by an AI model.", "synthetic_image_detection_additional_results": "Show detection details", "synthetic_image_detection_additional_results_hide": "Hide detection details", "synthetic_image_detection_rating": "Explanation: Our synthetic detection models have found ", "synthetic_image_detection_rating_4": "very strong evidence suggesting that this image is synthetic", "synthetic_image_detection_rating_3": "strong evidence suggesting that this image is synthetic", "synthetic_image_detection_rating_2": "moderate evidence suggesting that this image is synthetic. The absence of detection does not guarantee the image is not post-edited.", "synthetic_image_detection_rating_1": "weak evidence suggesting that this image is synthetic. The absence of detection does not guarantee the image is not post-edited.", "synthetic_image_detection_button_copy_text_1": "Copy text", "synthetic_image_detection_button_copy_text_2": "Text copied!", "synthetic_image_detection_alert_label_4": "Very strong evidence", "synthetic_image_detection_alert_label_3": "Strong evidence", "synthetic_image_detection_alert_label_2": "Moderate evidence (suspicious but non conclusive)", "synthetic_image_detection_alert_label_1": "Weak evidence (non conclusive)", "synthetic_image_detection_probability_text": "Probability:"}
{"synthetic_image_detection_label": "Media link", "synthetic_image_detection_name": "Synthetic Image Detection", "synthetic_image_detection_placeholder": "Paste the URL here", "synthetic_image_detection_results": "Results of the clip selected", "synthetic_image_detection_link": "Image link", "synthetic_image_detection_gan_name": "GAN", "synthetic_image_detection_gan_description": "This method aims to detect if the image has been generated by a Generative Adversarial Network (GAN).", "synthetic_image_detection_diffusion_name": "Diffusion model", "synthetic_image_detection_diffusion_description": "This method aims to detect if the image has been generated through a diffusion model neural network.", "synthetic_image_detection_progan_name": "ProGAN", "synthetic_image_detection_progan_description": "This model can detect fully synthetic images generated by ProGAN Models or architectures that are similar. The model's architecture is a variant of ResNet50, including an initial layer for residual extraction and with no downsampling in the first layer. The model is not pretrained and strong augmentations are carried out including blurring, compression, gaussian noise adding, geometric transformations, cut-out, and brightness and contrast changes.", "synthetic_image_detection_adm_name": " ADM", "synthetic_image_detection_adm_description": "This model can detect fully synthetic images generated by ADMs or architectures that are similar. The model's architecture is a variant of ResNet50, including an initial layer for residual extraction and with no downsampling in the first layer. The model is not pretrained and strong augmentations are carried out including blurring, compression, gaussian noise adding, geometric transformations, cut-out, and brightness and contrast changes.", "synthetic_image_detection_progan_rine_mever_name": "ProGAN RINE", "synthetic_image_detection_progan_rine_mever_description": "This model detects fully synthetic images. It specializes in detecting images generated by Generative Adversarial Networks (GAN). The CLIP (Contrastive Language-Image Pre-training) technology extracts key characteristics from the image.", "synthetic_image_detection_ldm_rine_mever_name": "LDM RINE", "synthetic_image_detection_ldm_rine_mever_description": "This model detects fully synthetic images. It specializes in detecting images generated by Latent Diffusion Models (LDM), while exhibiting strong detection performance across several other generative methods. The CLIP (Contrastive Language-Image Pre-training) technology extracts key characteristics from the image.", "synthetic_image_detection_title": "Detection results", "synthetic_image_detection_alert": "This image has been detected as generated with a ", "synthetic_image_detection_alert_2": " algorithm", "synthetic_image_detection_error_400": "Error: Invalid image link. Ensure it points to a publicly accessible image with dimensions between 128x128 and 2000x2000 pixels.", "synthetic_image_detection_error_generic": "An error happened. Please try again or try a different image", "synthetic_image_detection_not_found": "No detection found", "submit_button": "Submit", "button_localfile": "Local file", "synthetic_image_detection_gauge_detection": "Detection", "synthetic_image_detection_gauge_no_detection": "No detection", "synthetic_image_detection_additional_explanation_text": "Tip: A result above 70% indicates that an image is highly probable to have been generated by an AI model.", "synthetic_image_detection_additional_results": "Show detection details", "synthetic_image_detection_additional_results_hide": "Hide detection details", "synthetic_image_detection_rating": "Explanation: Our synthetic detection models have found ", "synthetic_image_detection_rating_4": "very strong evidence suggesting that this image is synthetic", "synthetic_image_detection_rating_3": "strong evidence suggesting that this image is synthetic", "synthetic_image_detection_rating_2": "moderate evidence suggesting that this image is synthetic. The absence of detection does not guarantee the image is not post-edited.", "synthetic_image_detection_rating_1": "weak evidence suggesting that this image is synthetic. The absence of detection does not guarantee the image is not post-edited.", "synthetic_image_detection_button_copy_text_1": "Copy text", "synthetic_image_detection_button_copy_text_2": "Text copied!", "synthetic_image_detection_alert_label_4": "Very strong evidence", "synthetic_image_detection_alert_label_3": "Strong evidence", "synthetic_image_detection_alert_label_2": "Moderate evidence (suspicious but non conclusive)", "synthetic_image_detection_alert_label_1": "Weak evidence (non conclusive)", "synthetic_image_detection_probability_text": "Probability:"}
12 changes: 6 additions & 6 deletions src/components/NavBar/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,11 @@ const NavBar = () => {
setOpenAlert(true);
}
} else {
if (newValue.title === "navbar_twitter_crowdtangle")
window.open(
process.env.REACT_APP_TSNA_SERVER + "csvSna?lang=" + currentLang,
"_blank",
);
else if (newValue.path === "factcheck" || newValue.path === "xnetwork")
if (
newValue.path === "csvSna" ||
newValue.path === "factcheck" ||
newValue.path === "xnetwork"
)
window.open(
process.env.REACT_APP_TSNA_SERVER +
newValue.path +
Expand Down Expand Up @@ -968,6 +967,7 @@ const NavBar = () => {
/>
),
tsvPrefix: "twitter_crowdtangle",
path: "csvSna",
pathGroup: "TOOL",
type: keyword("navbar_category_data"),
typeId: 5,
Expand Down
8 changes: 4 additions & 4 deletions src/components/NavItems/tools/Alltools/AllTools.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ const AllTools = (props) => {
};

const handlePush = (path) => {
if (path === "factcheck" || path === "xnetwork") {
if (path === "csvSna" || path === "factcheck" || path === "xnetwork") {
window.open(process.env.REACT_APP_TSNA_SERVER + path, "_blank");
} else {
navigate("/app/tools/" + path);
/* history.push({
pathname: "/app/tools/" + path,
state: { media: mediaTool }
})*/
pathname: "/app/tools/" + path,
state: { media: mediaTool }
})*/
}
};

Expand Down
Loading

0 comments on commit b9e7f0c

Please sign in to comment.