Questions tagged [efficientnet]

questions about retraining efficientnet with Keras to create new object detection models

efficientnet is a lightweight convolutional neural network architecture achieving the state-of-the-art accuracy with an order of magnitude fewer parameters and FLOPS, on both ImageNet and five other commonly used transfer learning datasets.

109 questions
7
votes
3 answers

How to remove first N layers from a Keras Model?

I would like to remove the first N layers from the pretrained Keras model. For example, an EfficientNetB0, whose first 3 layers are responsible only for preprocessing: import tensorflow as tf efinet =…
sebastian-sz
  • 1,418
  • 8
  • 13
5
votes
1 answer

Does image classification transfer learning require negative examples?

Task is to determine which of 3 classes does an image belongs to, or none. I received a ready model. EfficientNet B4 with ImageNet weights had transfer learning applied to identify 4 classes: 3 target ones and a 4th "None". Latter was trained on…
Serge
  • 1,531
  • 2
  • 21
  • 44
3
votes
0 answers

EfficientNet and MobileNetV2 models from TensorFlow.Keras not being reproducible on GPU

After downloading an EfficientNet model from tensorflow.keras.applications.efficientnet, and retraining it on our own data, I've noticed that the results are not reproducible. The results are reproducible for other architectures like VGG16,…
mohaghighat
  • 1,293
  • 17
  • 29
3
votes
1 answer

Keras Transfer-Learning setting layers.trainable to True has no effect

I want to finetune efficientnet using tf.keras (tensorflow 2.3) but i cannot change the training status of layers properly. My model looks like this: data_augmentation_layers = tf.keras.Sequential([ …
J-H
  • 1,795
  • 6
  • 22
  • 41
3
votes
0 answers

Keras Efficientnet B0 use input values between 0 and 255

I am using a EfficientNet B0 from keras application. tf.keras.applications.EfficientNetB0(include_top=True,weights=None,input_tensor=None, input_shape=(224, 224, 6), pooling=None,classes=5,classifier_activation="softmax") Keras thereby normalizes…
3
votes
2 answers

Keras prediction returns only one class in binary problem

I have implemented an EfficientNet in Keras for a binary problem using image generator. In the test case when i predict the output it return an array with a set of probability but referred to only one class, here the code and the…
fflpdqqoeit
  • 65
  • 1
  • 10
3
votes
1 answer

transfer learning - trying to retrain efficientnet-B07 on RTX 2070 out of memory

this is the training code I am trying to run work when trying on 64gb ram CPU crush on RTX 2070 config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 0.7 tf.keras.backend.set_session(tf.Session(config=config)) model =…
Naor Tedgi
  • 5,204
  • 3
  • 21
  • 48
2
votes
1 answer

Unable to use EfficientNet with transfer learning

I want to use EfficientNet with transfer learning in the Eurosat-rgb dataset. The problem I have is that it doesn't seem to learn. First, I start with the following model using transfer learning with MobileNet and it works fine (1) model_base =…
2
votes
0 answers

Getting non-deterministic results running EfficientnetB0/Efficinetnet-lite0 models on GPU (using tensorflow-gpu 2.2)

The following random seeds were set SEED = 1 random.seed(SEED) np.random.seed(SEED) tf.random.set_seed(SEED) The following Environmental Variables were set TRUE os.environ['TF_CUDNN_DETERMINISTIC'] = TRUE os.environ['TF_DETERMINISTIC_OPS'] =…
2
votes
1 answer

Number of parameters: Disadvantages of inverted residual blocks for image classification tasks

I have a more general question regarding MobileNet and EfficientNet inverted residual blocks. I have a classification task for an image dataset that is of lower complexity. Therefore I have chosen an architecture with few parameters (EfficientNet…
2
votes
3 answers

import efficientnet.keras as efn - AttributeError: module 'keras.utils' has no attribute 'generic_utils'

I am trying to use EfficientNet from https://github.com/qubvel/segmentation_models. So, I installed this via pip: !pip install git+https://github.com/qubvel/segmentation_models Then I tried to import efficientnet.keras: import efficientnet.keras as…
Tobitor
  • 1,388
  • 1
  • 23
  • 58
2
votes
1 answer

How to get reproducible result in Amazon SageMaker with TensorFlow Estimator?

I am currently using AWS SageMaker Python SDK to train EfficientNet model (https://github.com/qubvel/efficientnet) to my data. Specifically, I use TensorFlow estimator as below. This code is in SageMaker notebook instance import sagemaker from…
2
votes
1 answer

Can I use EfficientNetB7 as my baseline model for image recognition?

I have seen many articles that used EfficientNetB0 as their baseline model, but I never saw anyone used EfficientNetB7 yet. From the EfficientNet Github page (https://github.com/qubvel/efficientnet) I saw that EfficientNetB7 achieved a very high…
Sacchirro
  • 21
  • 2
2
votes
1 answer

Keras model containing EfficientNet submodel can't load_weights; VGG works fine

I have an ubermodel that uses a submodel as a layer for feature extraction. My code is modular such that I can easily switch which submodel I'm using to perform feature extraction simply by changing whichever submodel I assign: ... elif…
Nickolas
  • 111
  • 1
  • 4
1
vote
0 answers

LookupError when using SHAP for TensorFlow pretrained models

I'm trying to get shap values for my pret-trained EfficientNetB0 model. import shap import numpy as np import tensorflow as tf import cv2 model = tf.keras.applications.EfficientNetB0(weights='imagenet') def…
Nandana
  • 11
  • 2
1
2 3 4 5 6 7 8