detection

PHP get real IP (proxy detection)

谁都会走 提交于 2019-11-30 04:18:16
I do get track the "real" IP of an user, if he has an proxy wich sends the header of the real IP... does any of have a better solution, or even more headers? Since this function is used very often in the script, it has to be very fast, and it does not seem in that constellation :/ A few suggestions I came up with, but could not realise: put the headers in the order, what is used the most "in the wild", sothat the functions finishes fast making the pre_match-detecting for IP faster === function get_real_ip() { $proxy_headers = array( 'CLIENT_IP', 'FORWARDED', 'FORWARDED_FOR', 'FORWARDED_FOR_IP'

Find peak (regions) in 2D data

风格不统一 提交于 2019-11-30 03:51:38
问题 I am looking to find peak regions in 2D data (if you will, grayscale images or 2D landscapes, created through a Hough transform). By peak region I mean a locally maximal peak , yet NOT a single point but a part of the surrounding contributing region that goes with it. I know, this is a vague definition, but maybe the word mountain or the images below will give you an intuition of what I mean. The peaks marked in red (1-4) are what I want, the ones in pink (5-6) examples for the "grey zone",

How to detect language

二次信任 提交于 2019-11-30 03:50:57
Are there any good, open source engines out there for detecting what language a text is in, perhaps with a probability metric? One that I can run locally and doesn't query Google or Bing? I'd like to detect language for each page in about 15 million pages of OCR'ed text. Not all documents will contain languages which use the Latin alphabet. Depending on what you're doing, you might want to check out the python Natural Language Processing Toolkit (NLTK), which has some support for Bayesian Learning Algorithms. In general, the letter and word frequencies would probably be the fastest evaluation,

detecting a redirect with javascript - how?

我是研究僧i 提交于 2019-11-30 02:33:51
问题 Is there any way to detect whether a webpage is going to redirect me to another, knowing its URL? I mean the situation when you type URL in a text field and the script examines it for 3xx redirections. 回答1: Yes, you can do this quite easily in Javascript. It'd look something like: var xhr = new XMLHttpRequest(); xhr.onload = function() { if (this.status < 400 && this.status >= 300) { alert('this redirects to ' + this.getResponseHeader("Location")); } else { alert('doesn\'t redirect '); } }

Faster RCNN for TensorFlow

喜你入骨 提交于 2019-11-29 20:51:44
Has anyone implement the FRCNN for TensorFlow version? I found some related repos as following: Implement roi pool layer Implement fast RCNN based on py-faster-rcnn repo but for 1: assume the roi pooling layer works (I haven't tried), and there are something need to be implemented as following: ROI data layer e.g. roidb . Linear Regression e.g. SmoothL1Loss ROI pool layer post-processing for end-to-end training which should convert the ROI pooling layer's results to feed into CNN for classifier. For 2: em...., it seems based on py-faster-rcnn which based on Caffe to prepared pre-processing (e

Detect which image is sharper

假装没事ソ 提交于 2019-11-29 20:28:27
I'm looking for a way to detect which of two (similar) images is sharper. I'm thinking this could be using some measure of overall sharpness and generating a score (hypothetical example: image1 has sharpness score of 9, image2 has sharpness score of 7; so image1 is sharper) I've done some searches for sharpness detection/scoring algorithms, but have only come across ones that will enhance image sharpness. Has anyone done something like this, or have any useful resources/leads? I would be using this functionality in the context of a webapp, so PHP or C/C++ is preferred. The simple method is to

Improving accuracy OpenCV HOG people detector

心不动则不痛 提交于 2019-11-29 20:02:00
I'm working in a project. A part of project consist to integrate the HOG people detector of OpenCV with a camera streaming . Currently It's working the camera and the basic HOG detector (CPP detectMultiScale -> http://docs.opencv.org/modules/gpu/doc/object_detection.html ). But don't work very well... The detections are very noising and the algorithm isn't very accuracy... Why? My camera image is 640 x 480 pixels. The snippet code I'm using is: std::vector<cv::Rect> found, found_filtered; cv::HOGDescriptor hog; hog.setSVMDetector(cv::HOGDescriptor::getDefaultPeopleDetector()); hog

how to predict with .meta and checkpoint files in tensorflow?

こ雲淡風輕ζ 提交于 2019-11-29 16:28:26
问题 I'm learning about MobileNet thesedays and i'm new to tensorflow. After training with ssd-mobilenet model,i got checkpoint file , .meta file , graph.pbtxt file and so on. When I try to predict with these files, i can't get the output such as box_pred, classs_scores... Then I found predict demo code used .pb file to load graph ,and used "get_tensor_by_name" to get output, but I don't have .pb file. So, how can I predict an image with .meta and ckpt files ? BTW, here is predict demon main code:

Python usb detection

99封情书 提交于 2019-11-29 15:31:34
问题 First sorry for my english ! my environement : python : 2.7.3 wxwidgets : 2.9.4-1 wxpython : 2.9.4-1 ubuntu : 12.04 context : I have to detect when an usb hard-drive is plugged or unplugged and do some action on it. For example when a disk is plugged i wan to get the mount point (ex:/media/usb0) and the system point (ex:/dev/sdb1). I need both two path and i do not want made a system call like (subprocess : mount -l). I have tried several ways : - pyudev : only get the system path on EVT

iOS Determine the corners of a Business Card in realtime

萝らか妹 提交于 2019-11-29 14:21:18
问题 I want to implement a business card detecting functionality like this app (https://scanbot.io). The camera should detect a business card and automatically take a picture of it (only the business card). My idea was using BradLarson's GPUImage library, detect the corners (using the Harris corner detection algorithm), calculate the biggest rectangle with the corners obtained and crop the image contained inside the rectangle. Here is my code: - (void)setupFilter { videoCamera = [