# ROI Constants BODY = (0.0, 0.0, 1.0, 1.0) TAG = (0.05, 0.62, 1.0, 0.65) DTAG = (0.05, 0.592, 1.0, 0.622) TNC = (0.02, 0.98, 1.0, 1.0) CTA = (0.68, 0.655, 0.87, 0.675) GNC = (0.5, 0.652, 0.93, 0.77) # ROIs for Ribbon Detection ROIS = [ # Top section divided into 3 parts (0.0, 0.612, 0.33, 0.626), # Top left (0.33, 0.612, 0.66, 0.626), # Top middle (0.66, 0.612, 1.0, 0.626), # Top right # Bottom section divided into 3 parts (0.0, 0.678, 0.33, 0.686), # Bottom left (0.33, 0.678, 0.66, 0.686), # Bottom middle (0.66, 0.678, 1.0, 0.686), # Bottom right # Extreme Right section (0.95, 0.63, 1, 0.678), # Middle Section (between Tag and Click) (0.029, 0.648, 0.35, 0.658), # Middle left (0.35, 0.648, 0.657, 0.658) # Middle right ] # Detection parameters for Ribbon DETECTION_PARAMS = { 'clahe_clip_limit': 2.0, 'clahe_grid_size': (8, 8), 'gaussian_kernel': (5, 5), 'gaussian_sigma': 0, 'canny_low': 20, 'canny_high': 80, 'hough_threshold': 15, 'min_line_length': 10, 'max_line_gap': 5, 'edge_pixel_threshold': 0.01 } # Prompts PTAG = "Extract all the text from the image accurately." PEMO = "Carefully analyze the image to detect emojis. Emojis are graphical icons (e.g., 😀, 🎉, ❤️) and not regular text, symbols, or characters. Examine the image step by step to ensure only graphical emojis are counted. If no emojis are found, respond with 'NUMBER OF EMOJIS: 0'. If emojis are present, count them and provide reasoning before giving the final answer in the format 'NUMBER OF EMOJIS: [count]'. Do not count text or punctuation as emojis." PGNC = "Is there a HAND POINTER/EMOJI or a LARGE ARROW or ARROW POINTER? Answer only 'yes' or 'no'." # Lists for Content Checks RISKY_KEYWORDS = [ # General gambling terms "casino", "poker", "jackpot", "blackjack", "sports betting", "online casino", "slot machine", "pokies", # Gambling website and app names (Global and India-promoted) "stake", "betano", "bet365", "888casino", "ladbrokes", "betfair", "unibet", "skybet", "coral", "betway", "sportingbet", "betvictor", "partycasino", "casinocom", "jackpot city", "playtech", "meccabingo", "fanDuel", "betmobile", "10bet", "10cric", "pokerstars" "fulltiltpoker", "wsop", # Gambling websites and apps promoted or popular in India "dream11", "dreamll", "my11circle", "cricbuzz", "fantasy cricket", "sportz exchange", "fun88", "funbb", "funbeecom", "funbee", "rummycircle", "pokertiger", "adda52", "khelplay", "paytm first games", "fanmojo", "betking", "1xbet", "parimatch", "rajapoker", # High-risk trading and investment terms "win cash", "high risk trading", "win lottery", "high risk investment", "investment scheme", "get rich quick", "trading signals", "financial markets", "day trading", "options trading", "forex signals" ] ILLEGAL_ACTIVITIES = [ "hack", "hacking", "cheating", "cheat", "drugs", "drug", "steal", "stealing", "phishing", "phish", "piracy", "pirate", "fraud", "smuggling", "smuggle", "counterfeiting", "blackmailing", "blackmail", "extortion", "scamming", "scam", "identity theft", "illegal trading", "money laundering", "poaching", "poach", "trafficking", "illegal arms", "explosives", "bomb", "bombing", "fake documents" ] ILLEGAL_PHRASES = [ "how to", "learn", "steps to", "guide to", "ways to", "tutorial on", "methods for", "process of", "tricks for", "shortcuts to", "make" ] COMPETITOR_BRANDS = [ "motorola", "oppo", "vivo", "htc", "sony", "nokia", "honor", "huawei", "asus", "lg", "oneplus", "apple", "micromax", "lenovo", "gionee", "infocus", "lava", "panasonic","intex", "blackberry", "xiaomi", "philips", "godrej", "whirlpool", "blue star", "voltas", "hitachi", "realme", "poco", "iqoo", "toshiba", "skyworth", "redmi", "nokia", "lava" ] APPROPRIATE_LABELS = [ "Inappropriate Content: Violence, Blood, political promotion, drugs, alcohol, cigarettes, smoking, cruelty, nudity, illegal activities", "Appropriate Content: Games, entertainment, Advertisement, Fashion, Sun-glasses, Food, Food Ad, Fast Food, Woman or Man Model, Television, natural scenery, abstract visuals, art, everyday objects, sports, news, general knowledge, medical symbols, and miscellaneous benign content" ] RELIGIOUS_LABELS = [ "Digital art or sports or news or miscellaneous activity or miscellaneous item or Person or religious places or diya or deepak or festival or nature or earth imagery or scenery or Medical Plus Sign or Violence or Military", "Hindu Deity / OM or AUM or Swastik symbol", "Jesus Christ / Christianity Cross" ] # Image Quality Thresholds MIN_WIDTH = 720 MIN_HEIGHT = 1600 MIN_PIXEL_COUNT = 1000000 PIXEL_VARIANCE_THRESHOLD = 50