Hi @prachimathur
Can you check the CRXDE, to see where the smart tags are stored for a image.
Then create a servlet which accept image path and you can serach for the smart tag for that assets,
basic code example
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/DownloadAssetsImage.java
Resource assetResource = resourceResolver.getResource(assetPath);
if (assetResource != null) {
// Get the Asset object from the resource
Asset asset = assetResource.adaptTo(Asset.class);
if (asset != null) {
// Fetch the smart tags from the metadata node of the asset
String[] tagIds = asset.getMetadataValue("predictedTags");
// Get the TagManager from the resource resolver
TagManager tagManager = resourceResolver.adaptTo(TagManager.class);
// Convert tag IDs to Tag objects
if (tagIds != null && tagManager != null) {
for (String tagId : tagIds) {
Tag tag = tagManager.resolve(tagId);
if (tag != null) {
tags.add(tag);
}
}
}
}