# 4 KSecure: A Universal Method for Active Manipulation Detection in Images of Any Resolution
## 3 Method
### Evaluation
#### 3.4.2 Detection Metrics Obtained
This metric answers the question of how accurate the detection was from the perspective of the predicted manipulation area, indicating what percentage of predicted pixels were truly modified. The formula is given by \[Coverage=\frac{|P\cap G|}{|P|}\]  
Figure 9: Average F1 for different resolutions of test images (our dataset). Figure 10: A summary of IoU metric values in relation to different combinations of attack true (our dataset). Figure 11: A summary of Dice metric values in relation to different combinations of attack true (our dataset). \[accuracy=\frac{TP+TN}{TP+TN+FP+FN}\]0 A summary of Coverage metric values in relation to different combinations of attack true (our dataset). \[accuracy=\frac{TP+TN}{TP+TN+FP+FN}\]1 A summary of AUC metric values in relation to different combinations of attack true (our dataset). * AUC--measures the performance of a binary classifier by calculating the area under the ROC (Receiver Operating Characteristic) curve. It indicates how well the model distinguishes between classes. The AUC value falls within the range (0, 1), where 1.0 represents perfect classification, 0.5 corresponds to random predictions, and 0.0 indicates completely incorrect classification. \[accuracy=\frac{TP+TN}{TP+TN+FP+FN}\]2 where \[accuracy=\frac{TP+TN}{TP+TN+FP+FN}\]3 \[accuracy=\frac{TP+TN}{TP+TN+FP+FN}\]4  
Analyzing the presented results, it is important to consider the variety of attack combinations. All possible combinations of attacks and every possible number within a given combination are considered, with the order of attacks in the sequence being irrelevant. The first point on the \(x\)-axis is labeled as \"none\", representing a scenario where no attack was applied. This was included to verify the correctness of the metric computation algorithms and data flow. The metric values for this point should be 0.0 or close to it, ensuring that the system operates correctly. This can be considered a test field for diagnosing potential errors. The graphs display results in ascending order based on the number of introduced attack combinations, up to a maximum of six. Within the bars of the bar chart, the number of samples used to compute the mean value of the metric for each combination is marked in white. Additionally, a horizontal red line indicates the global average value of the metric, allowing for the easy comparison of results, such as those obtained using different methods. One of the more notable values among the presented combinations is the column indexed as 5 (counting from 1) on the \(x\)-axis, a pattern observed across all three graphs. This represents the crop pair attack, which--similar to the \"none\" value--yields a result of 0. At first glance, this might appear to be an error; however, in reality, it confirms the effectiveness of the 4 KSecure method. As described earlier, the crop pair attack involves selecting a specific portion of an image, cropping it and then resizing it to its native dimensions, effectively performing a zoom operation. Since no additional attacks are applied in this configuration, the image's content remains unaltered--it is simply magnified to emphasize a specific area. As a result, obtaining a metric value of 0 aligns perfectly with expectations and serves as a positive indicator of the algorithm's performance. It confirms that 4 KSecure does not incorrectly classify simple transformations, such as zooming, as unwanted manipulations. The analysis of the above diagrams reveals another positive aspect: the relatively small fluctuations (variance) in average values depending on different combinations and the number of attacks performed. It is worth noting that even in cases where the number of samples assigned to a given combination decreases significantly, the calculated mean value remains consistent with the results obtained on larger datasets. This indicates a low standard deviation and stable performance, which, in practice, translates to minimal metric oscillations across various attack scenarios.