Detecção facial com Deluge: dominando a task zoho.ai.detectFace

Detecção facial com Deluge: dominando a task zoho.ai.detectFace

Fala, pessoal!

Hoje quero compartilhar com vocês uma das tasks de Inteligência Artificial mais interessantes do Deluge: a zoho.ai.detectFace. Com ela, conseguimos detectar rostos em imagens diretamente nos nossos scripts, sem precisar de nenhuma API externa de visão computacional. Todo o conteúdo deste artigo é baseado na documentação oficial da Zoho.

O que é a zoho.ai.detectFace?  

A task zoho.ai.detectFace detecta todos os rostos presentes em uma imagem e retorna as coordenadas da caixa delimitadora (bounding box) de cada rosto detectado. Além disso, ela pode retornar atributos adicionais do rosto: emoção, gênero e pose.

Um exemplo prático: dá para prever se um seminário foi envolvente analisando as expressões faciais da plateia em uma foto. Vamos ver esse cenário mais adiante.

Pontos de atenção antes de começar  

A documentação oficial destaca alguns pontos importantes:

       Consumo de chamadas externas: cada execução da task dispara uma requisição de API ao back-end, que é descontada do limite de chamadas externas do serviço, conforme o seu plano. E atenção: o que conta são as execuções reais que recebem resposta, não quantas vezes a task aparece no script. Se ela estiver dentro de um for each que itera 5 vezes, serão consumidas 5 chamadas externas, mesmo que a task apareça apenas uma vez no script.

       Precisão: como toda predição de IA, os resultados podem não ser precisos. A Zoho informa que está trabalhando para melhorar isso.

       Resultados dinâmicos: o mesmo script pode produzir resultados diferentes, conforme o conhecimento da máquina.

Sintaxe  

<response> = zoho.ai.detectFace(<input_image>, <is_dominant_face>, <attribute_list>);

Entendendo cada parâmetro:

Parâmetro

Tipo de dado

Descrição

<response>

KEY-VALUE

Especifica as coordenadas previstas dos rostos e, se solicitado, a emoção, o gênero e a posição de todos os rostos da imagem.

<input_image>

FILE

Especifica o objeto de arquivo que contém a imagem.

Nota: o arquivo só pode ser obtido da nuvem usando a task invokeUrl. Esta task não pode ser aplicada diretamente em campos de imagem ou de upload de arquivo do Zoho Creator. O arquivo pode ser uma imagem nos formatos .png, .jpg ou .jpeg. O tamanho máximo permitido é de 5MB.

<is_dominant_face>

BOOLEAN (true/false)

Especifica a condição para retornar os dados do rosto predominante ou de todos os rostos da imagem.

true - Retorna a bounding box do rosto predominante.

false - Retorna as bounding boxes de todos os rostos da imagem.

<attribute_list> (opcional)

LIST

Especifica a lista de valores a retornar. Os valores suportados são:

gender - Inclui o gênero do rosto na resposta retornada: Male (Masculino) / Female (Feminino).

emotion - Emoção do rosto: Angry (Raiva) / Fear (Medo) / Happy (Feliz) / Neutral (Neutro) / Sad (Triste) / Surprise (Surpresa).

pose - Retorna o ângulo/pose do rosto: Yaw (Guinada - rotação horizontal, para os lados) / Pitch (Inclinação - rotação vertical, para cima e para baixo) / Roll (Rolagem - inclinação lateral da cabeça).

 

Exemplo 1: Detectar rostos em uma imagem  

O script abaixo detecta o rosto da imagem e retorna suas coordenadas:

image_file = invokeurl

    [

         url: "https://c0.wallpaperflare.com/preview/52/764/33/twin-boys.jpg"

    ];

response = zoho.ai.detectFace(image_file, false);

Aqui, image_file é o FILE que representa a imagem da qual os rostos serão detectados, false é o valor BOOLEAN que especifica que a task retornará todos os rostos da imagem, e response é o KEY-VALUE que representa os objetos detectados na imagem e suas coordenadas.

Exemplo 2: Detectar atributos adicionais como gênero, emoção e pose  

O script a seguir detecta os rostos da imagem e retorna a resposta com coordenadas dos rostos, gênero, emoção e pose:

image_file = invokeurl

     [

         url:"https://c0.wallpaperflare.com/preview/52/764/33/twin-boys.jpg"

     ];

 

attribute_list = list();

attribute_list.add("gender");

attribute_list.add("emotion");

attribute_list.add("pose");

response = zoho.ai.detectFace(image_file, false, attribute_list);

A attribute_list é a LIST de valores que precisam ser retornados.

Exemplo 3: Usar a task com imagem enviada em um campo do Zoho Creator  

Nota: este exemplo é aplicável apenas ao Zoho Creator.

O código abaixo baixa a imagem do campo através da API e retorna a resposta com a task zoho.ai.detectFace. A task não pode ser usada diretamente com os campos de formulário do Zoho Creator. Antes, é necessário estabelecer uma connection dentro da aplicação. Para baixar o arquivo enviado no formulário, é preciso usar a Download File API com a task zoho.ai.detectFace:

// Substitua <account_owner_name> pelo nome de usuário do dono da conta Creator.

// Substitua <app_link_name> pelo link name da aplicação alvo.

// Substitua <report_link_name> pelo link name do relatório alvo.

// Substitua <record_ID> pelo ID do registro do qual deseja baixar o arquivo.

// Substitua <field_link_name> pelo link name do campo de upload ou imagem.

image_file = invokeurl

    [

    url: "https://creator.zoho.com/api/v2/<account_owner_name>/<app_link_name>/report/<report_link_name>/<record_ID>/<field_link_name>/download"

    type: GET

    connection: "creator_oauth_connection"

    ];

 

attribute_list = List();

attribute_list.add("gender");

attribute_list.add("emotion");

attribute_list.add("pose");

 

response = zoho.ai.detectFace(image_file, false, attribute_list);

Onde creator_oauth_connection é o TEXT que representa o nome da connection, criada usando o serviço padrão Zoho OAuth. Ao criar a connection, inclua os scopes mencionados na documentação da Zoho Creator - Download File API.

Resumindo  

       Detecta todos os rostos de uma imagem (ou só o predominante) com bounding box

       Atributos opcionais: gender, emotion e pose

       A imagem deve vir da nuvem via invokeUrl (.png, .jpg ou .jpeg, máximo de 5MB)

       No Zoho Creator, use a Download File API com uma connection para imagens de campos de formulário

       Cada execução consome uma chamada externa do limite do seu plano

Links úteis (documentação oficial)  

       Detect Face - Zoho Deluge

       Artificial Intelligence Tasks

       invokeURL Task

       Download File API - Zoho Creator

       Connections - Zoho Creator

 

E aí, já usou as AI Tasks do Deluge em algum projeto? Conta nos comentários!

 

    • Sticky Posts

    • Participe dos encontros exclusivos Zoho User Groups (ZUGs)

      Temos um convite especial para você! Participe dos Zoho User Groups (ZUGs), encontros presenciais que conectam usuários, especialistas e parceiros da Zoho. Esses eventos são a oportunidade perfeita para compartilhar melhores práticas e descobrir como
    • Boas Práticas na Comunidade Zoho Brasil

      Participar da Comunidade Zoho Brasil pode ser uma experiência enriquecedora e colaborativa, mas para que isso aconteça, devemos sempre contribuir para um ambiente positivo e construtivo. Aqui estão algumas dicas de boas práticas para garantir que todos
    • Seja muito bem-vindo à Comunidade Zoho Brasil!

      É com muita empolgação que convidamos você a fazer parte deste novo espaço de colaboração, interação e troca de conhecimentos! Na Comunidade Zoho Brasil você poderá criar tópicos de conversa nos fóruns e também colaborar em discussões produtivas iniciadas
    • A assistente de redação inteligente do Zoho Writer, Zia, agora oferece suporte ao português brasileiro!

      Obtenha sugestões contextuais de ortografia e gramática e melhore a qualidade geral do seu conteúdo com a Zia ao escrever em português. Estamos treinando a Zia em um novo idioma para atender à crescente demanda dos nossos usuários por acesso multilíngue.

    Nederlandse Hulpbronnen


      • Recent Topics

      • Create Package From A Picklist

        Dear Zoho, Can it be made possible to create a package from a picklist? The reason our company makes a picklist is for that to become a package Our sales orders have 600-1000 items I hope that makes it clear that it's hard to delete 990 items when we
      • Migrating from Zoho Checkout to Zoho Billing

        I have an active Zoho Checkout account where I'm charging customers for subscriptions. Now I'm looking to upgrade and only use Zoho BIlling, in which my account in on read only mode at the moment. I can see is also tracking the customers and its payments.
      • API - Bank Accounts | Reconciliation Discrepancy

        Unless I'm reading it wrong, the documentation for the Bank Reconciliations API is inconsistent with itself. https://www.zoho.com/books/api/v3/bank-accounts/#create-a-bank-reconciliation The text definition says that the transaction_id should be a string,
      • another little issue

        So to get over showing prices with VAT we used the price lists and made the prices inclusive. The problem is now on the items it wants to show the orginal retail value which makes no sense. Ideas please
      • Handle Leading Zeros in a Number Field

        Hi, If I use a Number Field, set with Min 7 Digits and Max 7 Digits, and enter 0000001, it will result in 1 and an error as it removes the leading zeros, the same with entering 0012340 will result in 12340 and error. So I have to use a Text Field and
      • can't access zoho account

        I can't log in to my zoho account, can you help me
      • Cliq iOS can't see shared screen

        Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
      • HTML PDF Templates / Build From Scratch option not visible for Custom Modules

        Hi everyone, I am working with Zoho Books Custom Modules and trying to create a custom 4x4 package label PDF template using HTML/CSS. According to the official Zoho Books documentation for HTML PDF Templates, there should be an option like: Settings →
      • Virtual Option for Fields

        Hi, I would like to be able to choose another option other than Read-Only or Disabled, such as Virtual. And with Virtual, the field is shown on the form and avilable in rules, but NOT saved to the Database. A use case is having multiple Large Lists of
      • Prefix & Suffix on Single Line, Number, etc.

        Hi, I would like to have the same Prefix and Suffix that was added to the Unique ID on Text and Number Fields. Use case could be as basic as temperature, as per another Idea I have to use Single Line (Text) for a number that might have leading zeros today,
      • Customer User Fields for use in Rules

        Hi, I would like to be able to add custom fields to the users, such as Department or Role, which can then be used in Rules, Reports, etc. as a condition. A use case is limiting Global lists or Choices based on the users Custom Field, so one form can be
      • Locked out of MFA due to changing phones

        I have been locked out of my Zoho Books account since i changed my mobile phone over. I can get the OTP through the ZOHO Books software but i cant confirm using my phone app as nothing appears to authorise. I need to know how to register/set up my new
      • 👍 Zoho CRM's Notes now gets Reactions and a new look

        Available in SA and JP DCs. Rolling out to other DCs in phases. Hello everyone, Notes help users capture important updates, collaborate with teammates, and maintain context for records. Now with Note Reactions, users can quickly acknowledge updates, express
      • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

        Availability Update: 29 September 2025: It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition exclusively for IN DC users. 2 March 2026: Available to users in all DCs except US and EU DC. 24
      • Zoho books and venmo

        Hi, Is there a way to hook Venmo into zoho books? I have a Venmo business account and want to be able to sync that. I know you can do it with the paypal integration but I dont want to use paypal for the fees and that doesnt allow me use/integrate my current
      • Updating Unit Code for New Item Creation, Quote and Invoicing is so inconvenient

        The Zoho Team has implemented many updates, but these updates should be optional. Before rolling out any new feature, they should already have a solution in place that allows users to remove or disable it if they choose not to use it. Just yesterday,
      • Payroll needs to automatically remit taxes, not just give me the calculations

        Wagepoint, PayEvo, Waveapps, etc... All your competitors deposit employee payroll, but they ALSO remit taxes automatically. Get with the program, your Payroll app is extremely sparse.
      • Creating new Teams meeting from CRM doesn't enable Team functions in the meeting

        Hi I'm trying to set up the meeting integration and I've seen that when I create a Meeting in the CRM and set the location to Online and the Provider to Teams, and complete the boxes, add a participant etc, whilst the meeting is created in Teams, the
      • Approval Process configuration is now more flexible and fully customizable

        The Approval Process is back with an improved user experience designed to make it easier to build structured, flexible, and intuitive approval workflows. Here’s a look at some of the key enhancements: Name Your Rules & Stages You can now give each approval
      • Admin Logging in as another User

        How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Latest Update (27th April 2026): With the early
      • Introducing Approval SLA for Approval Processes

        Approvals can sometimes be delayed when approvers do not respond within the expected timeframe, which can slow down your recruitment processes. With the new Approval SLA in Zoho Recruit, you can set deadlines for approval requests and define automated
      • Introducing Microsoft Word Integration in Zoho Contracts

        We are excited to announce a new feature that brings contract authoring and negotiation in your familiar environment — the Microsoft Word Integration. What This Integration Brings The Microsoft Word Integration connects Zoho Contracts with the Microsoft
      • Map My Client Locations for Zoho CRM Extension: Turn CRM Addresses Into Action

        Hello everyone, Your CRM knows who your customers are. Now, see where they are on the interactive map directly from Zoho CRM. Introducing Map My Client Locations for Zoho CRM, an extension built for businesses that rely on sales visits, field service,
      • Scheduled and Automated Report Delivery from Zoho Projects

        Zoho Projects has useful reports including task reports, timesheet summaries, and workload charts. However, there is currently no way to schedule these reports to be automatically delivered to stakeholders on a recurring basis. This means: Project managers
      • How can I filter inactive/disable agent tickets?

        Hello, We have an user-agent that left the company and we inactive/disabled his agent. So, now I can no longer filter or search tickets that he is the current owner, or even create a rule to reassign tickets to another person when the ticket is reopen.
      • Add Reauthentication Option for Zoho Bug Tracker Integration in Zoho Desk

        Hello Zoho Desk Team, We hope you're doing well. We would like to request an enhancement to the Zoho Bug Tracker integration within Zoho Desk. Current Limitation: At the moment, there is no option to reauthenticate the Zoho Bug Tracker integration in
      • Dashboards for Customers

        Is it possible to build dashboards for each customers in the community for their tickets?
      • Collaborate Visually with Whiteboard in Zoho Projects

        Whiteboard in Zoho Projects allows you to collaborate visually by creating diagrams, annotating designs, and sketching project workflows using shapes, text, and images within project modules. Team members can work simultaneously, improving productivity
      • Fields in MS-Word Template

        With the new MS-Word integration, how does one create fields in an imported MS-Word document which can then automatically be populated with an Intake Form?
      • Displaying only unread tickets in ticket view

        Hello, I was wondering if someone might be able to help me with this one. We use filters to display our ticket list, typically using a saved filter which displays the tickets which are overdue or due today. What I'd really like is another filter that
      • Zoho Bookings Flow Step not Triggering on Appointment booked

        I noticed yesterday that my appointment booked flows were not triggering when we had booked appointments in Zoho Bookings. I checked the trigger and noticed the trigger values updated to be defined to a workspace and service event rather than our whole
      • UCP: Why We Killed the Multi-Portal Mess and Simplified Customer Self-Service

        Let's talk about the multi-portal mess nobody wants to admit that it exists. Your customer needs an invoice from one app, wants a ticket update from another, and has a project waiting in a third, each behind its own login, its own UI, its own "was it
      • Zoho Tables is now available in Zoho One!

        Hello Zoho One users, We’re excited to announce that Zoho Tables is now included as a part of Zoho One suite! As teams grow, managing projects, approvals, inventories, campaign trackers, and operational workflows across multiple spreadsheets become difficult.
      • Zoho Publish is now available in Zoho One!

        Hello Zoho One users, We’re excited to announce that Zoho Publish is now included as part of the Zoho One suite! As businesses grow, managing Google Business Profiles across many locations becomes challenging. Business information needs to stay accurate,
      • 📣 Ask the team behind Zoho SalesIQ: Summer '26 Q&A

        Hi everyone! Following our recent webinars, Summer '26 Release: What's New in Zoho SalesIQ—where we walked you through all the new features, what they do, and how they work—and Driving the AI Evolution: Building Smarter Customer Experiences with Zoho
      • Upcoming update to field values in Zoho Books - Zoho Analytics integration

        Hello Users, We'd like to inform you of an upcoming update to the tax_category values in the Zoho Books integration for Zoho Analytics from October 20, 2026. What's Changing? tax_category field values are being renamed to align with the conventions already
      • Announcing the new SKILL.md for Zoho CRM and the updated OAS repository!

        We are introducing a new zoho-crm skill to make working with Zoho CRM Developer tools (like APIs, functions, widgets, client scripts, queries etc) easier and faster, with the help of AI in your preferred AI harness like Claude Code, Codex, Cursor, VSCode
      • Kaizen #259 - Working with Zoho CRM APIs using zoho-crm skill

        In the previous Kaizen, we introduced the zoho-crm skill and discussed how it can work with different CRM developer capabilities. The zoho-crm skill makes it easier to work with Zoho CRM without having to remember every API endpoint, request structure,
      • How can I populate dropdown data with information from another source or app?

        I want to maintain a list of items in another app (say in excel or another database) and sync those as items in a drop down menu, instead of copy pasting to import. Is this kind of a feature available?
      • Zoho Community Digest - September 2026 | Part 1

        Hi everyone, and welcome back! September opens with a strong set of updates. Zoho CRM brings workflow automation down to the subform row level and ships a new SKILL.md for AI-assisted development, Zoho Desk introduces conditional branching with Automation
      • Next Page