Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate image similarity based on various factors for image data sets comparison, aiding in automated content filtering.
The SimilarityFilter node is designed to evaluate and compare the similarity between two sets of image data, providing a comprehensive analysis based on various factors such as class overlap, spatial arrangement, confidence levels, object sizes, and relationships between objects. This node is particularly beneficial for tasks that require distinguishing between images based on their content, such as in image retrieval systems or automated tagging processes. By calculating a similarity score, the node helps in determining whether two images are similar enough to be considered equivalent or related, based on a customizable threshold. This functionality is crucial for AI artists and developers who need to automate the process of image comparison and filtering, ensuring that only relevant images are processed further.
This parameter determines the importance of class overlap in the similarity calculation. It affects how much the presence of similar objects in both images contributes to the overall similarity score. The default value is 0.3, with a range from 0.0 to 1.0, allowing you to adjust the weight based on the significance of object classes in your specific use case.
Spatial weight influences the impact of spatial similarity, which compares the locations of objects within the images. A higher weight means that the spatial arrangement of objects will have a greater effect on the similarity score. The default value is 0.2, with a range from 0.0 to 1.0.
This parameter controls the weight of confidence similarity, which assesses the confidence levels of detected objects in the images. It helps in determining how much the certainty of object detection should influence the similarity score. The default value is 0.2, with a range from 0.0 to 1.0.
Size weight affects the contribution of size similarity, which compares the sizes of detected objects in the images. It is useful for scenarios where the size of objects is a critical factor in determining similarity. The default value is 0.15, with a range from 0.0 to 1.0.
This parameter sets the weight for relationship similarity, which evaluates the distances between objects in the images. It is particularly useful for assessing the relative positioning of objects. The default value is 0.15, with a range from 0.0 to 1.0.
The threshold parameter defines the minimum similarity score required for the images to be considered similar. Scores above this threshold will return a positive similarity result. The default value is 0.5, with a range from 0.0 to 1.0, allowing you to fine-tune the sensitivity of the similarity detection.
This output provides the calculated similarity score between the two images, expressed as a floating-point number. It represents the overall similarity based on the weighted factors and is crucial for determining the degree of similarity.
This boolean output indicates whether the similarity score exceeds the specified threshold. A value of True
means the images are considered similar, while False
indicates they are not.
The explanation output is a string that provides a detailed breakdown of the similarity calculation, including the individual contributions of each factor and the detected classes in both images. This output is valuable for understanding how the similarity score was derived and for debugging purposes.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.