11

Given you have images stretched out as columns in a table with ~48,500 rows, I am assuming you have the raw images that are 220x220 in dimension. You can use a function available via OpenCV called inpaint, which will restore missing pixel values (for example black pixels of degraded photos). Here is an image example. Top-left shows the image with missing ...


3

If all of your images are similar to this one(or have a small set of possible designs), you can simply reference the location (pixel-wise) on the image where this fields are and slice it. After slicing you can use any OCR algorithm to extract that data. If your data has more variation than that, you can use OCR on the entire image, which is usually a slow ...


3

Check out this blog post. There you find a summary of two fairly new papers from the field, which might start you off. One about semantic segmentation, the other about a classification problem.


3

what is the difference between these two steps? In that specific Notebook that you linked, normalization means: shrink a numerical distribution in the [0,1] interval. It is commonly referred to as Min-Max Scaling. Shrinking the distribution in the [0,1] interval moves its mean somewhere between 0 and 1. Zero-centering instead means: to "shift" the values ...


3

BiGAN, Bi-directional GAN(variation of GAN(Generative Adversarial Network)) can be explored for anomaly detection. I have used for my use case. Since I dont have large image dataset, my results are not that good.


3

I am building on the first part of @Dylan's answer: For general items like "dogs" pre-trained models are easily available. A good starting point is ImageNet. There are plenty of pre-trained models available for this dataset, e.g. see here for PyTorch. Since ImageNet includes multiple categories for a given item you can check this list to see which indexes ...


3

$64\times 64 = 4096$. You're short about $8000$ pixels.


2

There are multiple ways to go after this. You can do mean imputation, median imputation, mode imputation or most common value imputation. Calculate one of the above value for either rows or columns depending on how your data is structured. One of the simplest ways to fill Nan's are df.fillna in pandas


2

for any (x,y) if NAN you can impute to average of surrounding pixels as: if((x==0 & y==0): return (x+1)+(y+1))/2 else if(x==x_max & y==y_max): return (x-1)+(y-1))/2 else if(x==0 & y==y_max): return (x+1)+(y-1))/2 else if(x==x_max & y==0): return (x-1)+(y+1))/2 else if(x==0): return ((x+1)+(y-1)+(y+1))/3 else if(x==x_max): return ...


2

Have you looked into Tesseract (and its Python wrapper/interface: pytesseract)? I don't guarantee that it will solve your problems entirely, but it offers bounding box and OCR features. On this Tesseract site it lists possible page segmentation modes that you could play around with. There is also this page that provides some quality improvement ...


2

There are two options : Scan the images with a higher DPI. This should accentuate vertical separation between paragraphs. Train a Deep learning model for Text Detection in scene. Examples : https://github.com/qjadud1994/CRNN-Keras and https://github.com/mvoelk/ssd_detectors


2

Yes, it is technically possibly. The easiest algorithm you can try out is siamese networks. Basically siamese networks try to learn a similarity measurement of two inputs (images, sounds, whatever) and work quite well for problems with little labeled data. You can also find hands-on tutorials guiding you through the details like tutorial 1 or tutorial 2. ...


2

Detecting outliers is actually not an easy task. You can detect outliers by looking at uncertainty measurements. Nevertheless there are different kind of outliers. For example an outlier can be an out of distribution sample (you want to distinguish cats and dogs, but you input a penguin) or you can have "outliers" because the class estimate is not clear (...


2

You can use the following scalings $$x’=\dfrac{x}{255} \qquad (1)$$ $$x’=\dfrac{x-127.5}{127.5} = \dfrac{x}{127.5}-1 \qquad (2)$$ for rescaling to $[0,1]$ or $[-1,1]$. The rescaling of inputs tries to keep the range of weights in a small range. Theoretically it is not necessary to rescale your inputs because it can be compensated by an appropriate ...


2

As far as I know you might archieve this with Reinforcement Learning. But there are some limitations in this approach: You have to train your algorithm a long time for even learning to press a button. The second limit is that you have to define the possible actions, that the agent might choose. And remember: Every single thing your system has to learn will ...


2

I don't know about any papers, though making your objects more distinct should definitely help your model to learn proper filters. One thing to keep in mind though is your production data. Will you be also feeding images with poor exposure, white balance, contrast? If so, you need to train your model on such data. As far as I know, this repository produces ...


2

I assume you a list of the filenames called movie_images # Could get filenames with: # import os; movie_images = os.listdir("./folder/with/images/") movie_filenames = ["11_lion_king.jpg", "22_avengers.jpg"] First create a mapping between the ID values and the filenames: # Use the "_" to split the filename and take the first items, the ID mapping = {f....


2

Have you tried setting class_mode='categorical' in your generators? I believe class_mode='sparse' works when your loss function is defined as 'sparse_categorical_crossentropy' whereas 'categorical_crossentropy' works for class_mode='categorical'.


2

You don't have to blur your image before passing it to Canny. OpenCv's implementation already includes a blurring step. So by passing a blurred image, you're effectively blurring the image twice. That will suppresses edges. Read about openCv's implementation here.


2

Of course, making them smaller will cause loss of information. Since before you had N x M data points for each image to describe the content of the image, but after resizing you will have n x m (Where n and N denote the number of rows in an image, m and M denotes the number of columns in an image. Also, n <= N and/or m <= M). That is, a small number of ...


2

In one epoch - It's the number of images in your Directory or the DataFrame In case of a custom Generator. It will be batch_size * steps_per_epoch You may check this with any of these approaches - Check the shape of prediction on train model.predict(traindata).shape Save the images into a dir by using save_to_dir='/content/train_data' Write a callback for ...


1

It's a pretty broad question, but maybe this and to a lesser extent this can help you get started.


1

I would recommend the brand new "AI for Medical Diagnosis" course on Coursera. In this course, you will learn how to apply Machine Learning (ML) techniques to concrete problems in modern medicine. Moreover, it focuses on several medical imaging problems. You can also look at some of our works [1, 2, 3], where we introduce these topics across the ...


1

I understand the data you have is just a bunch of unlabeled images of tires and you need to predict the tread depth. Your solution 1 requires a different dataset of labeled images. But if you had that, you could use it to train a model and forget about your unlabeled data. If the images are not very similar, maybe you could label a few and use transfer ...


1

I just changed the User-agent in the for loop so that now the request line in the loop is: r = requests.get(df.iloc[i,1], headers=headers) with headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/XXX.XX (KHTML, like Gecko) Chrome/XX.X.XXXX.XXX Safari/XXX.XX'} and this solved the error. I also added a r.raise_for_status() to ...


1

In transfer learning techniques, if you are adding new layers always make sure to compile your model. As your project is based on finding similarity of the image my suggestion is to do only flatten after adding new Conv2D layers. Most of the popular architecture does not contain Dense layer in case of similarity.


1

Short answer - Yes. The pretrained Resnet model has trained parameters (weights and biases). When you add extra layers on top of it, the parameters of these layers are randomly initialized. Therefore the final model will give random results. You need to train the new model after adding extra layers on your new dataset. You don't need to train all the ...


1

If image is a numpy object: image = image.reshape((50000,3,32,32)) and then print: print(image[:,3,:,:])


1

You don't need to change their size. You can zero pad the images when you feed them into the Network. Zero padding creates a "frame of zeros" around each image, so that they all take equal shape. conv layers in Keras / TensorFlow 2.0 come with already built-in zero padding arguments.


1

You may apply Wolfram Language to your project. There is a free Wolfram Engine for developers and with the Wolfram Client Library for Python you can use these functions in Python. Either the CUDALink Overview and CUDALink Guide or the OpenCLLink Overview and OpenCLLink Guide will enable you to run code on your GPU. However, the CUDALink guide image process ...


Only top voted, non community-wiki answers of a minimum length are eligible