Skip to content

Commit

Permalink
Merge pull request #739 from AFP-Medialab/synthetic-images-enhancements
Browse files Browse the repository at this point in the history
Synthetic images enhancements
  • Loading branch information
Sallaa authored Feb 19, 2025
2 parents 1e93809 + 0b9c583 commit f804bd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@ export const gigaGanWebpR50Grip = new SyntheticImageDetectionAlgorithm(
"synthetic_image_detection_gigagan-webp_r50_grip_description",
[ROLES.EVALUATION, ROLES.EXTRA_FEATURE],
);

export const admR50Grip = new SyntheticImageDetectionAlgorithm(
"adm_r50_grip",
"synthetic_image_detection_adm_name",
"synthetic_image_detection_adm_description",
[ROLES.EVALUATION, ROLES.EXTRA_FEATURE],
);
export const proGanRineMever = new SyntheticImageDetectionAlgorithm(
"progan_rine_mever",
"synthetic_image_detection_progan_rine_mever_name",
"synthetic_image_detection_progan_rine_mever_description",
[ROLES.EVALUATION, ROLES.EXTRA_FEATURE],
);
export const ldmRineMever = new SyntheticImageDetectionAlgorithm(
"ldm_rine_mever",
"synthetic_image_detection_ldm_rine_mever_name",
Expand Down Expand Up @@ -119,13 +106,11 @@ export const itwSpaiMever = new SyntheticImageDetectionAlgorithm(
export const syntheticImageDetectionAlgorithms = [
proGanR50Grip,
ldmR50Grip,
admR50Grip,
proGanWebpR50Grip,
ldmWebpR50Grip,
gigaGanWebpR50Grip,
ganR50Mever,
ldmR50Mever,
proGanRineMever,
ldmRineMever,
itwRineMever,
itwSpaiMever,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,13 @@ const SyntheticImageDetectionResults = ({
);
}

const floor = Math.floor(percentage);
const rounded =
percentage > 50 ? Math.round(percentage) : Math.floor(percentage);

if (floor >= 100) return 99;
if (floor <= 0) return 1;
if (rounded >= 100) return 99;
if (rounded <= 0) return 1;

return floor;
return rounded;
};
const [detailsPanelMessage, setDetailsPanelMessage] = useState(
"synthetic_image_detection_additional_results",
Expand Down

0 comments on commit f804bd3

Please sign in to comment.