New answers tagged

1

I assume you talking about preprocessing instead reprocessing. Divided the image with 255.0 value is a normalization technic called min/max normalization. Like the other normalization methods, min/max normalization used to improve performance of CNN's. Image process methods like gaussian blur, average filter etc. are using to remove the noise as you said. ...


1

About Pre-trained model : This is a very common practise (especially in image recognition) and here is how we use it. Let's imagine you want to recognize different types of food (beef, pork, vegetables, ...). You know some networks already exist that recognize all types of objects (boats, cars, food, sofas, ...). This objective of transfer learning is to use ...


1

You can first write the bottleneck features into a tfrecords file, and then load them as a dataset for the training phase. In the tensorflow documentation you can find complete examples of how to do both.


0

I figured it out. You have to convert tests labels in single-digits instead of one-hot encoding. To achieve this I changed the confusion matrix code from: Y_pred = np.argmax(model.predict(X_test),axis=1) print('Confusion Matrix') print(multilabel_confusion_matrix(y_test, Y_pred)) print('Classification Report') To: y_test_arg=np.argmax(y_test,axis=1) Y_pred =...


1

Here is a model tailored for your problem. And here is the research paper for the model.


0

if you look into the code you can figure what's exactly happening. Take tf.keras.layers.experimental.preprocessing.RandomRotation for example def call(self, inputs, training=True): ... def random_flipped_inputs(): flipped_outputs = inputs if self.horizontal: flipped_outputs = image_ops.random_flip_left_right(flipped_outputs, ...


1

One thing I want to mention here. What kind of loss function you are using? From your results, I deduce that you are using cross entropy with the parameter from_logits = True (that would explain the mentioned phenomenon) if you are with Keras, and you have the option from_logits = True, set it to false. I also recommend using label_smoothing = 0.1 or more (...


0

There is another option with which you don't have to copy the test file into another test file: datagen = ImageDataGenerator() test_data = datagen.flow_from_directory('.', classes=['test']) This solved my problem. For more info, see https://kylewbanks.com/blog/loading-unlabeled-images-with-imagedatagenerator-flowfromdirectory-keras


0

The models will stay the same for the case like ResNets, EfficientNets, NFNets and MobileNet amongst many others. To start with go EffNetB4, good training speed and accuracy. These are great feature extractors what you do with them bring another complexity so in multi-label, look at using label_smoothing for regularization.


1

This is overfitting, and it suggests that your images in each class are very similar to images across other classes. Since your images across classes seem very similar, 800 per class is actually not a lot of data to train on. It's likely your model is struggling to discriminate the dev data into the correct classes based on what little it can learn., and ...


0

The problem with a pre-defined validation set is that it can lead to overfitting more easily: the primary purpose of a validation set is to detect overfitting and if you keep tuning your hyperparameters for your model using a fixed validation set every time you train, then your model hyperparameters may be overfitting to that specific validation set.


0

If you have already split your training and validation sets into separate directories then there is no need to technically do the splitting in your code. However, the problem with a pre-defined validation set is that it can lead to overfitting more easily: the primary purpose of a validation set is to detect overfitting and if you keep tuning your ...


0

Yes, the typical approach is to obtain the saliency map of the input, which are "heatmaps" of the contribution of each pixel to the final classification. In this free online book about Explainable ML, you can find the most relevant approaches to obtain saliency maps, like vanilla gradients, together with other pixel attribution techniques. Here you ...


1

Let us say your target variable "1" represents "Harmful Object". Precision answers the question - Of all objects predicted as Harmful - How many are really harmful ? Recall answers the question - Of all the Harmful objects out there - How many were correctly identified ? You want to increase on Recall in your case - since that reduces the ...


Top 50 recent answers are included