Using a neural network to learn regression in image processing

I have a camera system with some special optics that warp the field of view of the camera, dependent on two variables, $\theta_1$ and $\theta_2$. Given a specific configuration of these two variables, each pixel on my camera (which is 500x600 resolution) will see a specific coordinate on a screen in front of the camera. I can calculate this for each pixel, but it requires too many computations and is too slow. So, I want to learn a model that …
Category: Data Science

How to remove background (watermark) logo from image

I have been scratching my head for a while. What I have is a scanned PDF document with text and water marked logo at the back as in the below image. I want to do OCR over this, which becomes very difficult because of the logo. All the ratchet I've done so far is for coloured images where they can find contrast difference. I've hit a wall when solving the same for an B&W image as shown. Would love any …
Category: Data Science

Retrive image from from features represented by histograms of oriented gradients

I am using histogram of oriented gradients for image classification using clustering in scikit learn. I am using hog from scikit-image to generate hog from 512x512 grayscale image. Here is an example: fd, hog_image = hog(image, orientations=8, pixels_per_cell=(16, 16), cells_per_block=(1, 1), visualize=True, channel_axis=-1) Where fd is used as features in classification. I wonder if there is a way to retrieve image from fitted coefficients in clustering model, in order to see how features differ between the clusters.(i.e go from fd …
Category: Data Science

Cable angle measurement (rotation)

I need to detect the rotation of a cable (degree) in the x-axis with high precision [0.2 (or more) degree detection] from its original state. Detailed description: I have a cable that is set in its original state. The system has rotated the cable in the x-axis. I want to know the degree the cable has been rotated from its original state. Example: There're following images for a specific cable in different rotation (angle) [0, 0.4, 0.6, 0.8]: 1) 2) …
Category: Data Science

after augmentation validation accuracy going down?

My main question is about augmentation. if I process the augmentation I believe it always better than less data but in my case the validation accuracy going down train : 7000 images , validation: 3000 images : validation accuracy:0.89 train : 40000 images , validation: 17990 images : validation accuracy:0.85 my augmentation code def data_augmentation_folder(trainImagesPath,saveDir): #X_train=load_training_data(trainImagesPath,"train") print("=====================================================") X_train = cleanData(trainImagesPath) X_train = np.array(X_train) print(X_train[0].shape) for i in range(5): #print(i) datagen = ImageDataGenerator(rotation_range=15, width_shift_range=0.1, height_shift_range=0.1, shear_range=0.01, zoom_range=[0.9, 1.25], horizontal_flip=True, vertical_flip=False, fill_mode='reflect', …
Category: Data Science

Why do we need convolutions over volume in convolutional neural networks for image recognition?

In convolutional neural networks, we make convolutions of three channels (red, green, blue) with a filter of dimensions $k\times k\times 3$, like in the picture: Each filter consists of adjustable weights, and can learn to detect primitive features, like edges. The filter can be different for each channel: one for R, another for G, yet another for B. My question is: Why do we need separate filters for each channel? If there's an edge, it will appear on each channel …
Category: Data Science

improving performance for a limited dataset with noisy images, pattern recognition

I am trying to recognize doodles in noisy images like in this one below. My dataset consists of only 10 000 images and 30 categories I've implemented a CNN but it is giving me a 6% accuracy. I am thinking about removing the noise before feeding the images to my CNN, but I have no idea which methods to use to remove this type of noise and I am not even sure that removing noise improves the NNs performance. Do …
Category: Data Science

Ways of calculating the area of colored regions in a map

Background I am a PHD student trying to improve my data science. One of my research projects, has me tasked with determining the size of the clusters in a colored image of regions. Here is an example image I am using. The coloring is natural as it represents the orientation of the microscope light. The light hits the surface in different ways resulting in the different colors. But I'm not trying to sum regions of similar colors, but instead just …
Category: Data Science

Beginner needs guidance. Machine Learning, preparing training data

i try to dip my feet into the field of computer vision and want to avoid mistakes along the way. The problem I have to solve: Classifiy images of 3D dental scans. For example: I wrote a script to create images of theses files in blender so i have full control over the image dimensions, quality, resolution ect. Now to my questions: Whats the best way to prepare a training dataset if you have full control over the process? Higher …
Category: Data Science

How to train a form recognizer

I'm working on a project in which I need to build a form recognizer that, given a form image, returns de key - values pairs. As I just got started, I wanted to hear some opinions about what should I try. Some questions that I have in mind: What models works best for the refered input and output? What features should be fed into that model? What should be the ideal size of the training dataset? Please, feel free to …
Category: Data Science

How to approach different image resolutions in deep learning for regression problem?

I have an image dataset of various resolutions and using regression DNN model with fixed n*n input resolution. As model learns certain positions in the image, I've been using zero padding to fit images resolutions to maintain 1:1 aspect ratio. Is there a better way to preprocess images? Without zero padding, I get worse results, and I guess maintaining aspect ratio is necessary to avoid objects' shape distortions in DNN input.
Category: Data Science

Is it possible to apply pooling across the channel dimension of the input tensor?

I have an input tensor of the shape (32, 256, 256, 256). In this tensor shape, 32 is the batch size. second 256 is the number of channels in the given image of size 256 X 256. I want to do pooling in order to convert the tensor into the shape(32, 32, 256, 256). In PyTorch, if I try to apply the pooling then the last two dimensions of the shape, related to the image, are changing, but not the …
Category: Data Science

How to prepare training data for deep learning models

I am working on a project which involves the application of deep learning models. I have collected training data. In collected images, I have more than one object in interest. I am not very clear how to label these images. Should I crop and then label or just feed as it is? I would appreciate any kind of help. In the attached image, I have marked two objects.
Category: Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.