Comments (8)
did you found a solution for that ?
from keras-fasterrcnn.
any one solved this error please???
from keras-fasterrcnn.
if len(neg_samples) != 0:
try:
selected_neg_samples = np.random.choice(neg_samples, C.num_rois - len(selected_pos_samples), replace=False).tolist()
except:
selected_neg_samples = np.random.choice(neg_samples, C.num_rois - len(selected_pos_samples), replace=True).tolist()
Just put a test before selecting negative samples.
from keras-fasterrcnn.
if len(neg_samples) != 0:
try:
selected_neg_samples = np.random.choice(neg_samples, C.num_rois - len(selected_pos_samples), replace=False).tolist()
except:
selected_neg_samples = np.random.choice(neg_samples, C.num_rois - len(selected_pos_samples), replace=True).tolist()
Just put a test before selecting negative samples.
after that i meet another question
File "train_frcnn.py", line 275, in
loss_class = model_classifier.train_on_batch([X, X2[:, sel_samples, :]], [Y1[:, sel_samples, :], Y2[:, sel_samples, :]])
IndexError: index 4 is out of bounds for axis 1 with size 1
from keras-fasterrcnn.
(any one solved this error please???)
from keras-fasterrcnn.
if C.num_rois > 1:
if len(pos_samples) < C.num_rois//2:
selected_pos_samples = pos_samples.tolist()
else:
if len(pos_samples) > 0:
selected_pos_samples = np.random.choice(pos_samples, C.num_rois//2, replace=False).tolist()
else:
selected_pos_samples = []
try:
if len(neg_samples) > 0:
selected_neg_samples = np.random.choice(neg_samples, C.num_rois - len(selected_pos_samples), replace=False).tolist()
else:
selected_neg_samples = []
except:
if len(neg_samples) > 0:
selected_neg_samples = np.random.choice(neg_samples, C.num_rois - len(selected_pos_samples), replace=True).tolist()
else:
selected_neg_samples = []
sel_samples = selected_pos_samples + selected_neg_samples
else:
from keras-fasterrcnn.
that seems to solve this issue
from keras-fasterrcnn.
I also met this problem. Anyone solve that? Help...
from keras-fasterrcnn.
Related Issues (20)
- tensorflow.python.framework.errors_impl.InvalidArgumentError: slice index 14 of dimension 1 out of bounds. HOT 2
- Train Model Fail
- It doesn't train,Epoch 1/2000,and stop for one hour HOT 2
- How does val_loss works when train model
- How should I run the inference?
- Can anyone pls explain this region of code? Why are we only taking num_regions/2 positive and negative boxes?
- Pre-train for inception resnet v2 HOT 1
- Data Augmentation
- Plot the model
- Incompatible shapes
- custom dataset
- tf2 - from colab to local machine - problems with TimeDistributed
- stuck at epoch 1 for vgg HOT 1
- trained hdf5 file
- Unable to reproduce PASCAL VOC performance
- Exception: 'a' cannot be empty unless no samples are taken
- How to check Testing accuracy
- AttributeError: 'Node' object has no attribute 'output_masks' HOT 1
- ValueError: Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor. HOT 1
- Parallel Computing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-fasterrcnn.