Questions tagged [python]

For questions related to AI implementation in the Python language

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Change YOLO algorithm's feature extractor

Is there any way to change the YOLO algorithm's feature extractor with DenseNet? And I saw that Circular Bounding Boxes could be used instead of Rectangular Bounding Boxes, how would you change the ...
0 votes
0 answers
10 views

Approach to using reinforcement learning on a MATLAB/Simulink model using PyTorch?

I have a MATLAB/Simulink model that I want to use reinforcement learning (specifically something like DQN) in PyTorch (or some other framework) to optimize one aspect of it. I am aware that there is ...
  • 1
0 votes
1 answer
46 views

How to generate new data using VAE?

I have built the following function which takes as input some data and runs a VAE on them: ...
  • 101
0 votes
1 answer
36 views

What is the problem in my implementation of actor critic?

I have been implementing both REINFORCE with baseline and actor-critic to solve "cartpole-v1". As a reminder, here is the presentation of the algorithms in Sutton and Barto's book (http://...
  • 101
0 votes
0 answers
12 views

Found input variables with inconsistent numbers of samples

I have an issue. the model gave me an error of Found input variables with inconsistent numbers of samples: But I don't understand why ...
  • 1
0 votes
1 answer
44 views

Is it possible to build a facial recognition system using a multi-layered DNN?

I am completely new to AI. As the title says, is it possible to build a facial recognition system using a multi-layered DNN? Would this be effective/practical? I want to implement such a neural ...
0 votes
0 answers
21 views

Multi-output regression problems

I am training CNNs on 3D image data (dimensions [500, 512, 512]) to locate 7 3D points inside the image. I have thought of two different ways to solve this problem, ...
0 votes
1 answer
33 views

Ways to Reduce False Positive or False Negatives in Binary Classification (0,1)

I am working on a task in which I need to classify binary labels 0 and 1 properly (as close to perfection as possible). My final dataset (ready for classification) has input data with 141 features and ...
1 vote
0 answers
34 views

How to code mathematical functions in terms of neural networks?

I'm exploring how to solve differential equations using neural networks and discovered this Lagaris et. al. paper. In the paper, the solution to a differential equation is written as a mathematical ...
  • 11
0 votes
0 answers
9 views

Referencing features by name instead of index when feeding inputs

Traditionally the inputs of a model is a matrix of N dimensions. This works well with inputs that are position-sensitive (For example in CV the placement of the pixels relative to each other can be ...
0 votes
1 answer
45 views

How to get meaningful vector embeddings for (lat, long) points and also GPS trajectories?

I have a data that consists of approx. 1.5M taxi trips in Porto, Portugal. (from: https://www.kaggle.com/competitions/pkdd-15-taxi-trip-time-prediction-ii/overview) Each of these trips have it's GPS ...
0 votes
1 answer
20 views

Is it possible to train a neural network or a classifier on SIFT keypoints and descriptors?

Is it possible to train a neural network or a classifier on SIFT keypoints and descriptors? I am working on a project which involves detecting an object (a bottle of energy drink) in an image and then ...
  • 3
-1 votes
1 answer
76 views

Is Diffusion model instable during the training? [closed]

I ran an experiment using a diffusion model (SR3 model) and got good results (experiment using jupyter notebook). Then, after running the same notebook many times with the same configuration, I did ...
  • 101
0 votes
1 answer
39 views

Crossover and Mutation function for value encoding [closed]

I have been trying to attempt writing a Genetic Algorithm using value encoding (fixed-length vectors of real numbers) instead of binary encoding. So far the code I have written works, but needs quite ...
0 votes
0 answers
48 views

Classify/categorize parts of text with machine learning (Python)

I need to parse some documents (which consists of questions, answers, transition messages and other texts) into a structured format. Here is an example of input document (part of it): I have to ...
  • 1
1 vote
1 answer
78 views

OpeanAI Gym. Train problem: invalid values [closed]

I have a problem with my reinforcement learning model. I am trying to simulate an electric battery storage. To keep it as simple as possible, the efficiency of charge, storage and discharge are 100%. ...
  • 13
-1 votes
1 answer
29 views

SQL Machine Learning using matrix multiplication

What is the easiest classification algorithm in SQL when my data looks like this? ...
3 votes
0 answers
49 views

Are there Reinforcement Learning algorithms specialized for the case $\gamma=0$?

I have a Reinforcement Learning problem where the optimal policy does not depend on the next state (ie gamma equals 0). I think this means that I only need an efficient exploration algorithm coupled ...
  • 31
0 votes
1 answer
69 views

Extremely good results in RNN-LSTM python code!! How can this happen?

I am using this code here: https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/ and more specifically the python code under the (1st) paragraph "...
0 votes
1 answer
51 views

What would the "state space" and its Python implementation be for my simulation?

Context I'm trying to build a social-consensus simulation involving two intelligent agents. The simulation involves a graph/network of nodes. Nearly all of these nodes (> 90%) will be green agents. ...
1 vote
0 answers
32 views

Training loss is decreasing very slowly while learning MNIST database

I am developing my ANN from scratch which is supposed to classify MNIST database of handwritten digits (0-9). My feed-forward fully connected ANN has to be composed of: One input layer, with ...
  • 11
0 votes
0 answers
38 views

How to keep the best shot of an object with an Object detection model over a video

I’m pretty new to Machine learning and stuff. I’m going to start to work on a project, I have a background with code. My goal is to collect data from my city roads and build a strong dataset for ...
0 votes
0 answers
30 views

openVINO human pose

Can someone give me a tip on what to research for predicting human pose with computer vision with the open VINO toolkit? Not a lot of wisdom here so any tips appreciated even at a high level on what I ...
  • 101
0 votes
0 answers
41 views

Very low accuracy (0.11) and it remains constant after few epochs on MNIST database

I am developing my ANN from scratch which is supposed to classify MNIST database of handwritten digits (0-9). My feed-forward fully connected ANN has to be composed of: One input layer, with ...
  • 37
0 votes
0 answers
17 views

Yolo darknet displays only most relevant match. Is it possible to display probabilities for all classes, even if they are very small?

Using yolo Darknet by AlexeyAB I have 2 classes: notouch and overpack - levels of tobacco in hookah bows. I have good accuracy, but the problem is that yolo displays most relevant class and it's ...
0 votes
0 answers
86 views

Where can I get Imagenet test dataset labels for evaluation

I have the imagenet train, validation and test set. I have been able to assign each image in the validation set into its respective class folders with the help of some online resources. However, for ...
0 votes
0 answers
122 views

Why is the greedy heuristic admissible and consistent for food at corners problem, but not for food anywhere problem?

UCBerkley has a great Intro to AI course (CS188) where you can practice coding up search algorithms. One of the exercises (question 6), asks to generate a heuristic that will have Pacman find all 4 ...
  • 133
0 votes
0 answers
70 views

How to increase accuracy for CNN?

I have built one CNN model and applied it to chest-xray Covid 19 pneumonia dataset. I am getting the classification report as follows: I am surprised to see that it is giving an excellent result on ...
  • 111
0 votes
0 answers
17 views

Thompson sampling, is it accurate for smaller sample sizes?

For example are 500 samples enough? I tried this code ...
  • 1
1 vote
1 answer
72 views

Training Loss Value Increasing instead of Decreasing [closed]

I am developing my first feed-forward fully-connected ANN from scratch based on batch learning mode on a toy training set. I am using back-propagation for calculating the gradient of the loss ...
  • 37
0 votes
0 answers
157 views

Problem with OpenAI gym in VSCode

I downloaded OpenAI Gym in windows from the console, it did not give me any error, but when I run the file nothing is shown as can be seen in the terminal. So I don't know what to do or what to ...
  • 1
0 votes
1 answer
12 views

How to filter out class for which the model has not been trained in ml web app?

I have developed an python based ml web app. It gives details of the book from a image of book cover. Problem: When I upload the book cover image then it works but when i click image of any random ...
0 votes
1 answer
41 views

How to improve the performance when no shuffling of dataloader is needed?

I'm currently doing some researches on video recognition. What I'm trying to do is like this paper. The idea is that: for processing a specific input video clip (shape: [T, C, H, W]), it needs ...
  • 1
1 vote
0 answers
29 views

Surrogate model to produce time series from parameter set

Say I have a model $M$ that takes in a parameter vector $\beta$, and produces a (numerical) time series. This could be a complicated model (e.g. a bespoke enzyme reaction model), or something simple ...
  • 11
0 votes
0 answers
39 views

Formatting Binance dataset to DeepLOB

I’m new to ML and really stuck on how to format the Order Book data from Binance to the same format of The FI-2010 dataset used in DeepLOB(Limit Order Book) Research paper. I kindly ask for your help. ...
0 votes
1 answer
56 views

Does the order of a Numpy array matter for CNN classification?

Image classification of RGB images in a Convolutional Neural Network is usually done by feeding the CNN first layer with a Numpy array with dimensions: pixel array by the number of channels. Example: [...
0 votes
0 answers
35 views

Semantic detection of domain names used for phishing

I present you my problem which seems quite simple but I don't know if it is possible to implement my problem with an algorithm. I tried to implement it with a simple program based on Bayes' theorem ...
0 votes
1 answer
37 views

Find the token-level edit transformation sequence from an edit matrix

I have a use-case where I would like to calculate edit distance sequences on a per-token basis i.e. I have managed to figure out how to get the edit distance matrix, using something like this: ...
0 votes
0 answers
28 views

Retrieving data from a table by matching ID values

I have two columns [Uid, Con_id]; I need to fetch Uid id's which are matched with some Con_id's [From 606 to 615]. For example, all user_id's in each con_id from 606 to 615. But each Uid should match ...
1 vote
1 answer
65 views

Why does my neural network perform different on the same images during training and testing?

I use tensorflow keras to build a neural network that classifies images of covid-19 rapid tests into three classes (Negative, Positive, Empty). During training the ...
0 votes
0 answers
22 views

Object detection on UAV images

So, the idea is that I have a custom set of UAV images. I zoomed them and I used LabelImg in order to draw the rectangles. I trained the model and when I run the code for object detection it does ...
0 votes
0 answers
53 views

Getting predictions from tab transformer model

I am working on implementing the tab transformer model into my dataset, and have it working so far and giving a fair ROC_AUC.I am using the code as seen below for my dataset. The only variation I have ...
0 votes
0 answers
35 views

linear layer bert sentence embedding

I have a special situation where I need to embed a sentence with bert-sentence transformer and get a numeric value for it. This is not possible with this model, ...
0 votes
0 answers
13 views

Image suggestions using feature extractor + ANN index

I am trying to build an image suggestion engine using resnet151 as a feature extractor and right now I am testing Annoy and Faiss as the ANN. I am having some issues with images that have similar ...
1 vote
0 answers
18 views

Brain Segmentation To 3D Model

My goal is to take a dataset of Brain Tumor segmentations, use computer vision to locate and highlight the tumor in each slice, then combine each slice (almost like stacking) to make a 3D model. In ...
0 votes
0 answers
86 views

Agent communication in multi agent system

My task is to compare different ways of communication between two(or more) intelligent agents and decide which has the best performance. I've done my research, and it appears that there are two ways ...
  • 1
1 vote
1 answer
82 views

Why does sklearn perceptron converge for linearly inseparable data points?

I learned that the perceptron algorithm only converges if the dataset is linearly separable. I am implementing this algorithm using scikit learn. The blue and orange points are from the training set, ...
0 votes
1 answer
19 views

Why do smaller weights converge faster for RNNs?

I am writing a Recurrent Neural Network using only the NumPy library for a binary classification problem. When I initialize the weights with np.random.randn, after 1000 epochs it gets ~60% accuracy, ...
  • 15
0 votes
0 answers
53 views

Python code for Background label removal from Biomedical images

I am doing research in Biomedical Image processing and Deep Learning using Python language. I have labels in the background (as highlighted in yellow ) and Pectoral muscle ( as highlighted in red) of ...
0 votes
2 answers
31 views

Can I shuffle data for delivery duration forecast problem?

I'm new to ML and trying to write a solution to a food delivery duration time problem (so called lead time). I used algorithms such as random forest and gradient boosting which gave OK results but not ...

1
2 3 4 5
7