583 questions
-5
votes
1
answer
44
views
How deploy trained model on react native mobile application? [closed]
I have a project of leaf classification, I already have trained model so i want to integrate the model to through mobile application using react native does anyone know how to make it possible?
0
votes
0
answers
19
views
Validation Accuracy stuck between 0.5-0.6
I am currently working on a custom VGG model for Breast Cancer Classification using mammography images. It has excellent accuracy for training images but the validation accuracy is stuck at 0.5-0.6. ...
0
votes
0
answers
20
views
Finetuning MobilenetV3S on Google Colab
Last year I finetuned MobileNetV3S on google colab [tensorflow version 2.15.0] gave me 95% (test) accuracy and loss below 0.25. However, running the same notebook now (2025-05) [tensorflow verion 2.18....
0
votes
0
answers
111
views
tflite-runtime ValueError: Didn't find op for builtin opcode 'FULLY_CONNECTED' version '12'. An older version of this builtin might be supported
I have trained and quantised my models on tensorflow==2.19.0 instead of a previous version and now am facing troubles in using the quantised models for inference on my Raspberry Pi (Raspbian GNU/Linux ...
1
vote
1
answer
155
views
DeepFace Analyze - Test scripts for batched image processing
I am having trouble getting image analysis batch processing to work. I would like to send a list of images to DeepFace to get a list of race, gender, and age predictions. I am calling test functions ...
3
votes
0
answers
56
views
How to calculate FPS in image classification?
Please, I would appreciate some help and will be grateful for any help.
I have some doubts about how to calculate the frame rate (FPS) in image classification for training an testing routines. I've ...
0
votes
1
answer
26
views
Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: (None, 4)
I'm making a CNN and I don't know the full ins and outs of coding. When i try to add the layers, it constantly gives me a "NotImplmentedError" and a "ValueError" that says ...
0
votes
0
answers
53
views
How to Integrate an Image Classifier with OpenDLP for Sensitive and Non-Sensitive Classification via APIs or any method?
I'm working on an open-source Data Loss Prevention (DLP) solution trying to integrate image scanning capabilities using machine learning (ML) for image classification. I’ve set up a reverse proxy with ...
0
votes
0
answers
25
views
Black regions in train_batch0.jpg
When training the YOLO11m-cls.pt with cusomize data, I found some black square region in train_batch*.jpg.
How can I adjust the hyper parameters to avoid generating it.
I tried some hyper parameters, ...
-1
votes
1
answer
49
views
Convolutional Neural Network is getting unexpectedly high validation accuracy, what could be causing this?
I am building/optimizing a CNN for classifcation of cars from this dataset.
My baseline model is getting suprisingly high accuracy from a very simple model architecture, I am concerned there is some ...
0
votes
0
answers
51
views
Core ML prediction for Image Classification Create ml model predict same result for different images
I am exploring the Apple Core ML framework.
I created a training model using Create ML app. Image Classification to identify the image is cat or a dog. The data set I used is referred from
https://www....
0
votes
1
answer
43
views
Why does the PDF of the feature vector follow a Gaussian mixture?
I am attempting to perform an image classification task on a dataset with
𝐿 classes. The network I am using is divided into a feature extractor and a classifier. When an image is passed through the ...
0
votes
0
answers
22
views
Can I use K-means clustering to compare change across two satellite images
I want to quanity the change in two satellite images that have the same spatial extent - can I define the clusters by calculating k-means clusters for both images stacked together and then apply the ...
1
vote
0
answers
64
views
How to Load a Custom-Trained ResNet50 Model with ImageAI in Python?
I'm working on an image classification project using a custom-trained ResNet50 model with ImageAI, but I'm encountering a persistent loading error that prevents me from using my trained model for ...
0
votes
0
answers
42
views
"ValueError: Shapes are incompatible", but where?
I load my datasets with keras.utils.image_dataset_from_directory(). Here's the code:
train_ds = image_dataset_from_directory(
"train",
validation_split=0.2,
subset="training",...
0
votes
1
answer
178
views
How to load a Pre Trained VGG16 model using TensorFlow and generate a confusion matrix
I have trained a VGG16 model (from tensorflow.keras.applications) on 15 categories of images on 100 epochs. After training, I saved the model as a file named 'best_model.h5', but unfortunately, I ...
0
votes
1
answer
288
views
Not able to load a Vision Transformer model post training
So I am using the example of the vision transformer model for image classification provided on the Keras website. The only difference is I have added a line to save the model once it is done training ...
3
votes
0
answers
86
views
validation loss improvement in ConvLSTM model for prediction of ASL Images
I have been trying to build a convLSTM model for classifying ASL images into 1 of the given 29 classes in the dataset. The dataset I am using is this - https://www.kaggle.com/datasets/debashishsau/...
1
vote
1
answer
121
views
how to fix ApplePersistenceIgnoreState error?
I am following a neuralnine tutorial on how to do image classification with neural networks.
I am using an Imac.
Below is the code:
import cv2 as cv
import numpy as np
import matplotlib.pyplot as plt
...
0
votes
1
answer
759
views
How to implement Grad-CAM to view activation map/heat maps on TensorFlow ResNet152V2 for image Classification
Hello I'm doing a small project on TensorFlow image classification using ResNet152V2.
I wrote a Train-Predict.py script that's able to train a trained_weights.hdf5 file to successfully predict images ...
0
votes
1
answer
99
views
How to preprocess image for INT8 post training quantization?
I am working on a binary classification problem using DenseNet121 on Keras. The original model yields an accuracy of ~93% and when float16 quantized (PTQ), accuracy acceptably drops to ~90%. I was ...
0
votes
0
answers
79
views
Image Classification Model halting at epoch 1/25, tensorflow keras model
I have been following a tutorial of a deep learning neural network model project and for some reason my model halts at the first epoch when trying to train on a dataset of images. I am not sure if ...
0
votes
0
answers
23
views
Is there any way to choose positive pairs in superpixels without loop?
I want to calculate the contrastive loss for hyperspectral image classification. I first have to derive the input needed for the contrastive loss based on the output logit[1,num_classes,h,w] of the ...
1
vote
1
answer
255
views
How to visualize predicted samples using my code need more answers
How to visualize samples that are used to test models that have been created using a confusion matrix? For example as below.
you can visit GitHub, the whole thing is similar, just the architecture ...
1
vote
0
answers
47
views
Incompatible shapes Error while using my model in a C# app
I am having problems with an image classificator model developed in python that I want to use in a C# industrial application.
This is the model structure:
model = Sequential([
Conv2D(32, (3, 3), ...
0
votes
1
answer
301
views
AttributeError: 'NoneType' object has no attribute 'items' when training DL dataset made using 'ImageDataGenerator'
I am trying to train a resnet50 model using transfer learning and a dataset containing 40,000 images.
I used ImageDataGenerator to prepare the dataset and then used flow_from_directory to make the ...
0
votes
0
answers
174
views
i keep getting this error : TypeError: Expected any non-tensor type, but got a tensor instead
i am trying to train mobilevit using this bee dataset from tensorflow and i keep getting this error
TypeError: Expected any non-tensor type, but got a tensor instead.
this is the code i wrote, ...
0
votes
1
answer
84
views
Loading images using Keras for CNN from directory but the images are not labeled in subfolders
I have a set of images in a directory train_data = 'dataset/train' for handwritten Arabic letters, but it only contains the images in one folder and is not divided into subfolders in order for the ...
0
votes
1
answer
118
views
Pytorch Lightning Multiclass 3D image classifier only predicts one class
Okay so to state first:
I have no coding / AI background, i have been learning this over the past few months, and i want to learn more!
After some time i created an image classifier with the help of ...
1
vote
1
answer
376
views
Tensorflow val accuracy is stuck for classifying images
I'm doing a challenge to create a classification for some images. I have 10.000 train images and 3.000 validation images, with 3 classes. But I can't increase my validation accuracy whatever I try. I ...
1
vote
0
answers
74
views
How can I use pickle file of model to predict on Image classification?
I have image classification model on trained on dataiku which is efficinet B4.
Now I want to use it pickle file to make prediction on image but I am unable to make predictions.
What is the image ...
0
votes
0
answers
32
views
Why doesn't the validation loss of my CNN for image classification decrease significantly?
I am creating a CNN network for image classification, but during training, my validation loss does not decrease below 1.2. What is wrong with my network? What should I add or remove from my network?
...
1
vote
0
answers
53
views
MNIST Image Classification Gradient Descent Neural Network not working
I have to files PreProcess.java:
/*
* 4/28/24
* Final
*/
package Final;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io....
0
votes
1
answer
114
views
Both training and validation accuracy is stuck at 50%
I am trying to perform binary classification on image data (mammographs). The dataset is perfectly balanced. I am using EfficientnetV2S model for the classification, but the training and validation ...
0
votes
0
answers
115
views
How to decide which parameters to implement in ImageDataGenerator?
I'm new to Image Processing/ Classification so I'm sorry if this is common knowledge. How do I decide which of ImageDataGenerator parameters/ features I should implement on my dataset? There are quite ...
0
votes
2
answers
2k
views
Exception encountered: Unrecognized keyword arguments passed to Conv2D: {'batch_input_shape': [None, 135, 135, 3]}
I have some models that were trained with an older version of Tensorflow, Keras and Python. Now I updated to Tensorflow 2.16.1, Keras 3.1.1 and Python 3.12.2. Now I cannot even load these models that ...
0
votes
0
answers
136
views
How to use labels in an image classification model in google colab
I'm trying to make a model that allows me to classify images of wifi and bluetooth spectrograms. this is the code
import matplotlib.pyplot as plt
from tensorflow.keras.layers import Input, Lambda, ...
0
votes
1
answer
114
views
Generate confusion matrix from Keras model predictions in R / RStudio
A lot of questions on exactly this on StackOverflow but all only applicable to Python (e.g. here).
I have created a keras model in R for binary classification, and would like to create a confusion ...
1
vote
1
answer
207
views
Keras in R - full list of metrics using compile()
I am using Keras in RStudio for binary image classification, but am having trouble trying to access the full list of in-built metrics available in the package when compiling my model. I know that ...
1
vote
1
answer
90
views
Different results when only test dataset is loaded using `keras.utils.image_dataset_from_directory`
I used the following lines to fetch my test dataset:
test_ds = keras.utils.image_dataset_from_directory(img_path, image_size=image_size, batch_size = batch_size)
When I run my model on this, I get ...
1
vote
0
answers
458
views
How to finetune open-clip
I have sucessfully tried to use the ViT-L-14 with open-clip without changing anything of its structure. Now I want to adapt it a little bit to the CIFAR100 database and to do so i have defined a ...
1
vote
0
answers
41
views
TFLite model always predicting image probability 1.0
I trained a Keras CNN model (binary classification) on a custom image dataset. The accuracy of the model on test dataset came to be 90.53% (also fyi, precision=90.68%, f1_score=91.55). Since I intend ...
2
votes
2
answers
3k
views
KeyError: 'Exception encountered when calling Functional.call()
I am trying to construct a model that accepts two inputs. Within this model, I've designed three blocks: two correspond to the structure of the first blocks of EfficientNetB0 up to block 4 (A), while ...
0
votes
0
answers
86
views
Tensorflow to Tensorflowlite conversion issue
Im trying to convert the Tensorflow model to Tensorflowlite model but it shows warning WARNING:absl:Compiled the loaded model, but the compiled metrics have yet to be built. model.compile_metrics will ...
0
votes
0
answers
170
views
Shape mismatch. The variable shape (1, 1, 256, 512), and the assigned value shape (512, 128, 1, 1) are incompatible
I'm running this code and I have adjusted as shown below:
import requests
//first block
import requests
url = 'https://github.com/fchollet/deep-learning-models/releases/download/v0.2/...
0
votes
1
answer
210
views
Simple ResNet model can not tell if two monotone images are the same color
I was experimenting with a problem training an image comparison model. I simplified it to the following problem.
I give pairs of images (3x128x128) to a model. The images are either completely black ...
0
votes
1
answer
54
views
Given groups=1, weight of size [16, 32, 3, 3], expected input[42, 19, 224, 224] to have 32 channels, but got 19 channels instead
I am trying to build a custom model for image classification. This is the code.
class CustomModel(nn.Module):
def __init__(self, input_channels, hidden_units, output_classes):
super(...
0
votes
1
answer
166
views
Template matching model for object orientation estimation converges fast with in-plane rotations only, but fails with full 3D orientations
Context
I'm experimenting with a model that should match a query image of a known object with the corresponding template image(s) where the orientation could be the same. (I will be dealing with ...
1
vote
0
answers
34
views
K means loop doesn't work for the image clustering
I am using the code in Study 2A in this link (https://github.com/yilangpeng/image-clustering/tree/main/study2A). In the D kmeans clustering, I met some problems because I need assign every label from ...
0
votes
1
answer
397
views
Issue with HuggingFace Inference API for ViT Model - “image-feature-extraction” Error
I’m experiencing an issue with the inference API for my Vision Transformer (ViT) model, rshrott/vit-base-renovation2.
https://huggingface.co/rshrott/vit-base-renovation2
When I attempt to use the API, ...