computer-vision

Error parsing text-format caffe.NetParameter: 54:17: Message type “caffe.ConvolutionParameter” has no field named “sparse_ratio”

泄露秘密 提交于 2021-01-28 13:58:56
问题 i hope you are doing well, i tried to run a python code that i downloaded from here : "https://github.com/may0324/DeepCompression-caffe/tree/master/examples/mnist" i am using Ubuntu 16.04,python (2.7,3.5), import sys import os sparse_ratio_vec = [0.33, 0.8, 0.9, 0.8] #sparse ratio of each layer iters = [500, 1000, 10500, 11000, 500] #max iteration of each stage def generate_data_layer(): data_layer_str = ''' name: "LeNet" layer { name: "mnist" type: "Data" top: "data" top: "label" include {

Finding object boundaries which are close to each other

时光总嘲笑我的痴心妄想 提交于 2021-01-27 18:01:06
问题 I am working on a computer vision problem, in which one step in the problem is find the locations where the objects are close to each other. Example, in the image below I am interesting in finding the regions marked in gray. Input : Output : My current approach is to first invert the image, followed by morphological gradient follower by erosion, then removing some non-interesting contours. Script is as follows: img = cv2.imread('mask.jpg', 0) img = (255 - img) kernel = np.ones((11,11), np

How to speed up the “ImageFolder” for ImageNet

£可爱£侵袭症+ 提交于 2021-01-27 17:12:10
问题 I am in an university, and all the file system are in a remote system, wherever I log in with my account, I could aways access my home directory. even though I log into the GPU servers through SSH command. This is the condition where I employ the GPU servers to read data. Currently, I use the PyTorch to train ResNet from scratch on ImageNet, my codes only use all the GPUs in the same computer, I found that the "torchvision.datasets.ImageFolder" will take almost two hours. Would you please

How to get the bounding box of text that are overlapped with background lines?

狂风中的少年 提交于 2021-01-27 12:30:53
问题 For example, in the following app screenshot, I want to get the bounding box tightly rounded over CA-85S (the text on the horizontal blue line), and Almaden Expy (text that overlapped with the blue line). I am extracting those bounding boxes for OCR. I've tried several approaches in openCV that none of those approaches work for me. 回答1: Using the observation that the desired text to extract is in black and has a contrast different from the blue river background lines, a potential approach is

Finding similar images with different intensities/brightness

回眸只為那壹抹淺笑 提交于 2021-01-27 12:27:03
问题 Suppose I have images as follows: What would be my options to compare the similarity between the two images? Obviously they are the same image just with different brightness. I couldn't find any plausible way for this and currently my best bet would be to train a cnn or autoencoder and compare the feature vectors of the outputs, but that just seems a bit overkill for this. Any tips would be appreciated. 回答1: Pretty robust working solution (I tested) is to check correlation of brightness sign

How to flip only one axis of transformation matrix?

≡放荡痞女 提交于 2021-01-27 08:40:14
问题 I have a 4x4 transformation matrix. However, after trying out the transformation I noticed that movement and rotation of the Y axis is going the opposite way. The rest is correct. I got this matrix from some other API so probably it is the difference of coordinate system. So, how can I flip an axis of transformation matrix? If only translation I can add minus sign on the Y translation, but I have no idea about opposite rotation of only one axis since all the rotation is being represented in

How to flip only one axis of transformation matrix?

烂漫一生 提交于 2021-01-27 08:40:06
问题 I have a 4x4 transformation matrix. However, after trying out the transformation I noticed that movement and rotation of the Y axis is going the opposite way. The rest is correct. I got this matrix from some other API so probably it is the difference of coordinate system. So, how can I flip an axis of transformation matrix? If only translation I can add minus sign on the Y translation, but I have no idea about opposite rotation of only one axis since all the rotation is being represented in

How to extract feature vector from single image in Pytorch?

谁说胖子不能爱 提交于 2021-01-27 07:02:57
问题 I am attempting to understand more about computer vision models, and I'm trying to do some exploring of how they work. In an attempt to understand how to interpret feature vectors more I'm trying to use Pytorch to extract a feature vector. Below is my code that I've pieced together from various places. import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from torch.autograd import Variable from PIL import Image img=Image.open(

How to extract feature vector from single image in Pytorch?

假装没事ソ 提交于 2021-01-27 07:01:53
问题 I am attempting to understand more about computer vision models, and I'm trying to do some exploring of how they work. In an attempt to understand how to interpret feature vectors more I'm trying to use Pytorch to extract a feature vector. Below is my code that I've pieced together from various places. import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from torch.autograd import Variable from PIL import Image img=Image.open(

PoseWarping: How to vectorize this for loop (z-buffer)

落花浮王杯 提交于 2021-01-27 05:31:58
问题 I'm trying to warp a frame from view1 to view2 using ground truth depth map, pose information, and camera matrix. I've been able to remove most of the for-loops and vectorize it, except one for-loop. When warping, multiple pixels in view1 may get mapped to a single location in view2, due to occlusions. In this case, I need to pick the pixel with the lowest depth value (foreground object). I'm not able to vectorize this part of the code. Any help to vectorize this for loop is appreciated.