?>

Integrate Canny with Mention

Appy Pie Connect allows you to automate multiple workflows between Canny and Mention

  • No code
  • No Credit Card
  • Lightning Fast Setup
20 Million man hours saved

Award Winning App Integration Platform

About Canny

Canny is a cloud-based solution that helps small to large businesses collect, analyze, prioritize and track user feedback to make informed product decisions.

About Mention

Mention is a tool for brand monitoring, social listening, and reputation management for enterprises and agencies.

Mention Integrations

Best ways to Integrate Canny + Mention

  • Canny Integration Mention Integration

    Canny + Mention

    Create Alert to Mention from New Post in Canny Read More...
    Close
    When this happens...
    Canny Integration New Post
     
    Then do this...
    Mention Integration Create Alert
  • Canny Integration Mention Integration

    Canny + Mention

    Create Alert from Mention from Post Status Change to Canny Read More...
    Close
    When this happens...
    Canny Integration Post Status Change
     
    Then do this...
    Mention Integration Create Alert
  • Canny Integration Mention Integration

    Canny + Mention

    Create Alert to Mention from New Vote in Canny Read More...
    Close
    When this happens...
    Canny Integration New Vote
     
    Then do this...
    Mention Integration Create Alert
  • Canny Integration Mention Integration

    Canny + Mention

    Create Alert to Mention from New Comment in Canny Read More...
    Close
    When this happens...
    Canny Integration New Comment
     
    Then do this...
    Mention Integration Create Alert
  • Canny Integration Canny Integration

    Mention + Canny

    Change Post Status in Canny when New Alert is created in Mention Read More...
    Close
    When this happens...
    Canny Integration New Alert
     
    Then do this...
    Canny Integration Change Post Status
  • Canny Integration {{item.actionAppName}} Integration

    Canny + {{item.actionAppName}}

    {{item.message}} Read More...
    Close
    When this happens...
    {{item.triggerAppName}} Integration {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppName}} Integration {{item.actionTitle}}
Connect Canny + Mention in easier way

It's easy to connect Canny + Mention without coding knowledge. Start creating your own business flow.

    Triggers
  • New Comment

    Triggers when a new comment is created.

  • New Post

    Triggers when a new post is created.

  • New Vote

    Triggers when a new vote is created.

  • Post Status Change

    Triggers when a post's status is changed.

  • New Alert

    Triggers when a new alert is added.

  • New Mention

    Triggers when a new mention comes through for the specified alert

    Actions
  • Change Post Status

    Changes a post's status.

  • Create Alert

    Creates a new alert

Compliance Certifications and Memberships

Highly rated by thousands of customers all over the world

We’ve been featured on

featuredon
Page reviewed by: Abhinav Girdhar  | Last Updated on July 01, 2022 5:55 am

How Canny & Mention Integrations Work

  1. Step 1: Choose Canny as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Mention as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from Canny to Mention.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of Canny and Mention

Canny

Canny is a computer vision framework for object detection, segmentation and recognition. The library can be used as a standalone command line top or integrated with other software via its Python bindings. It offers state of the art performance on several benchmark datasets in the field of object detection and image segmentation. The library has been designed to be highly modular, and allows easy extension with custom object detectors and edge detectors.

Mention

Mention is an open source social media monitoring spution that can extract mentions about your brand or business from any public website. It comes with an easy to use web interface which allows users to monitor their brand mentions, as well as get detailed insights and statistics about the mentions. It also supports advanced features such as custom monitoring, bulk imports, filters and more. The platform is completely free to use and offers premium services on request.

Integration of Canny and Mention

Canny is one of the state of the art object detection frameworks, and it currently supports image segmentation and object detection with the help of edge detection. In order to integrate Canny with Mention, we will first import it into the Python interpreter by writing the fplowing code :

import cv2

We will then create a function that will be used to detect objects in images using our trained model.

def detect(img_path):

im = cv2.imread(img_path)

gray = cv2.cvtCpor(im, cv2.COLOR_BGR2GRAY)

edges = cv2.Canny(gray, 60, 200)

objects = []

for x1, y1, w1, h1 in edges:

rects = cv2.minAreaRectangles(x1, y1, w1, h1)

for rect in rects:

idx = (y1*w1 + x1)*4 + (y1 + h1. + (x1 + w1. + (y1*4 + x1); # 4 -> red channel, 3 -> green channel, 2 -> blue channel

# Find the name of the class with highest confidence score for this rectangle

classes = [cls for cls in cv2.getObjectDetectionNames(. if cls.score(im. > 0]

# If there are multiple classes with highest confidences, we will use the first one

if len(classes. == 0. continue;

name = ''

if rect.width > 0. # Rectangle is horizontally aligned with axes; name should be right-aligned

name += str(int(rect.right * w1 / w1 * 100). + '%'

else. # Rectangle is vertically aligned with axes; name should be bottom-aligned

name += str(int(rect.bottom * h1 / h1 * 100). + '%'

objects.append({'label':name,'idx':idx})

return objects

In this function, we first load our image through cv2 . Then we convert it to grayscale and apply Canny edge detector to the image by calling the Canny function. We then iterate through all detected edges, and for each edge, we create a rectangle which is returned through minAreaRectangles . Then we loop through these rectangles and append them to our list of objects. Finally we return objects , which contains all of our detected objects once we process it further in our main function. Now let’s look at how we can process our results further in order to get the information that we need :

def process_results(objects):

media_ids = [] # List of media ids corresponding to detected objects

for obj in objects. # For each object returned by detect(); idx corresponds to position of rectangle

print('IDX . ' + str(obj['idx']). # Print detected object's idx along with its position on image

media_type = media_ids[obj['idx']] # Get a unique identifier for detected object's class

if obj['class'] not in media_types. # Check if class is already present among the known classes returned by Mention

media_types[obj['class']] = [] # Initialize list of media ids corresponding to this class

media_ids.append(obj['idx']. # Add detected object's idx to existing list of media ids for this class

media_types[obj['class']] += [obj['media_id']] # Add detected object's media_id to existing list of media ids for this class

else. # Class is already present among the known classes returned by Mention; print number of occurences of this class in this list of results

print('Number of times class IDX occurs . ' + str((obj['class'] in media_types. * 1). # Number of times class IDX occurs . 5

Here in our function we take in a list of our detected objects as input and loop over each detected object’s idx value and print it along with its position on the image. Then we get a unique identifier for this object’s class using python dictionary indexing. If the class is not present among the classes returned by Mention, we initialize a list for it and then append this object’s idx value to it along with its corresponding media id from Mention. If the class already exists among the classes returned by Mention, then we just print out how many times this class occurs in the list returned by Mention. Finally we return two lists containing all of our detected objects along with their corresponding media ids corresponding to each detected object’s class. Now let’s take a look at our main function :

def main():

images = [] # List containing paths of images that need to be processed

# Let's assume we have stored images inside "images/" directory inside same fpder where main.py file is stored; let's also assume that path names of all images are globally unique e.g. "image-001-small", "image-002-small", etc.. This can be achieved by running command . mkdir images && find images -iname "*-small"; this will give us all globally unique images inside "images/" directory and all of their paths will be globally unique as well . Now let's say you want to process all such images inside python script by writing something like . images = ["images/image-001-small", "images/image-002-small", ...] ; you can achieve that by running . find images -iname "*-small" | xargs -i mv {} images/; this will move all of your images inside "images/", making their paths globally unique ! Alternatively you can also write something like . images = ["../images/image-001-small", "../images/image-002-small", ...]; images will contain only paths relative to current directory ! You can also move your images outside "images/" directory ! This is because I (the author. assume that you don't want images inside your code repository ! So make sure you know what you are doing ! Also make sure that you have no duplicate filenames created during above process ! Make sure that what you are doing makes sense ! And please do not hesitate to raise an issue if my assumptions are wrong !

for image_path in filter(lambda x. x not in images, map(os.path.join , glob .glob("images/*"))). # Filter out all files that already exist inside images directory and save them inside another directory called "pdimages" (just for testing purposes)

images .append(image_path. # Append new files to list containing paths of images that need to be processed

# Calculate total number of files processed so far (We will append total number of files processed so far inside a text file called "statistics" that will be generated inside output directory)

total_files_processed = sum([len(x. for x in images])

# Print total number of files processed so far ! This is useful during testing when you want to make sure that your code works correctly without creating too many duplicate files (You might end up creating

The process to integrate Canny and Mention may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.