Comments (17)
I've fixed it by renaming the "compute_overlap.cython-36m-x86_64-linux-gnu.so" to "compute_overlap.so"
from efficientdet.
@nikola-j Do it really work on Windows?
@HaiLongEmb How about running python setup.py build_ext --inplace
to rebuild the module?
from efficientdet.
Hi @nicholasguimaraes , could you replace the compute_overlap.so of this repo with the one from keras-retinanet?
If it still does not work, try to rebuild it by running the setup.py
script from keras-retinanet.
Wait for your feedback.
from efficientdet.
Thank you for your reply.
In fact I don't have a compute_overlap.so file under keras-retinanet/utils.
I do have a compute_overlap.c , .pyd and .pyx.
I tried replacing the compute_overlap.pyx from EfficientDet/utils with the .pyx from RetinaNet/utils and I was able to start training but, I got an AssertionError after the first step.
"""
File "train.py", line 352, in
main()
File "train.py", line 347, in main
validation_data=validation_generator
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1433, in fit_generator
steps_name='steps_per_epoch')
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 220, in model_iteration
batch_data = _get_next_batch(generator, mode)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 362, in _get_next_batch
generator_output = next(generator)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 785, in get
six.reraise(*sys.exc_info())
File "C:\Users\Windows\AppData\Roaming\Python\Python36\site-packages\six.py", line 693, in reraise
raise value
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 779, in get
inputs = self.queue.get(block=True).get()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\multiprocessing\pool.py", line 644, in get
raise self._value
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 571, in get_index
return _SHARED_SEQUENCES[uid][i]
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 400, in getitem
inputs, targets = self.compute_inputs_targets(group)
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 369, in compute_inputs_targets
image_group, annotations_group = self.random_misc_group(image_group, annotations_group)
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 278, in random_misc_group
annotations_group[index])
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 257, in random_misc_group_entry
assert annotations['bboxes'].shape[0] != 0
AssertionError
"""
from efficientdet.
How to solve the same problem on Windows @xuannianz ,
from efficientdet.
@xuannianz I'm on ubuntu 18.04
from efficientdet.
Hello @xuannianz , I am also on Windows.
After running "python setup.py build_ext --inplace" I got the file "compute_overlap.cp36-win_amd64.pyd" which I renamed to "compute_overlap.pyd". I added the .pyd from retinanet/utils to efficientdet/utils and I was able to start training but soon I get another Error.
"""
Traceback (most recent call last):
File "train.py", line 352, in
main()
File "train.py", line 347, in main
validation_data=validation_generator
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1433, in fit_generator
steps_name='steps_per_epoch')
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 293, in model_iteration
callbacks._call_batch_hook(mode, 'end', step, batch_logs)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\callbacks.py", line 248, in _call_batch_hook
batch_hook(batch, logs)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\callbacks.py", line 531, in on_train_batch_end
self.on_batch_end(batch, logs=logs)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\callbacks_v1.py", line 362, in on_batch_end
profiler.save(self.log_dir, profiler.stop())
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\eager\profiler.py", line 144, in save
gfile.MakeDirs(plugin_dir)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 438, in recursive_create_dir
recursive_create_dir_v2(dirname)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 453, in recursive_create_dir_v2
pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(path))
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: logs/2019-12-05\plugins\profile\2019-12-05_14-18-11; No such file or directory
"""
Has anyone gotten the same error?
from efficientdet.
random_misc_group_entry
assert annotations['bboxes'].shape[0] != 0
AssertionError
Regarding the AssertionError I got a few days ago, it happened because I tried using background images with no x1,y1,x2,y2
from efficientdet.
@nicholasguimaraes You can pull the latest code in which I removed that assertion.
from efficientdet.
@nicholasguimaraes You can pull the latest code in which I removed that assertion.
I just pulled the latest code.
It seems that I cannot train without validation data.
"""
Traceback (most recent call last):
File "train.py", line 355, in
main()
File "train.py", line 350, in main
validation_data=validation_generator
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1433, in fit_generator
steps_name='steps_per_epoch')
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 220, in model_iteration
batch_data = _get_next_batch(generator, mode)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 362, in _get_next_batch
generator_output = next(generator)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 785, in get
six.reraise(*sys.exc_info())
File "C:\Users\Windows\AppData\Roaming\Python\Python36\site-packages\six.py", line 693, in reraise
raise value
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 779, in get
inputs = self.queue.get(block=True).get()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\multiprocessing\pool.py", line 644, in get
raise self._value
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 571, in get_index
return SHARED_SEQUENCES[uid][i]
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 392, in getitem
inputs, targets = self.compute_inputs_targets(group)
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 348, in compute_inputs_targets
image_group = self.load_image_group(group)
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 219, in load_image_group
return [self.load_image(image_index) for image_index in group]
File "C:\Users\Windows\Documents\EfficientDet\generators\common.py", line 219, in
return [self.load_image(image_index) for image_index in group]
File "C:\Users\Windows\Documents\EfficientDet\generators\csv.py", line 225, in load_image
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
"""
I'm not passing compute_val_loss as an argument.
This is my line to start training:
python train.py --phi 0 --freeze-backbone csv bin/csv_label/annotations.csv bin/csv_label/classes.csv
from efficientdet.
Check the image paths in your csv file.
from efficientdet.
Check the image paths in your csv file.
The image path is correct. I wonder if using .gif images could be the problem.
I use the same dataset to train retinanet and we works fine.
from efficientdet.
I fixed it!
On generators/csv_.py I updated the function load_image to load images with PIL instead of cv2, but that was not the solution.
I had to go to
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\tensorflow\python\lib\io
and update file_io.py , more specifically the function recursive_create_dir_v2.
that's what it looks now:
def recursive_create_dir_v2(path):
#print(path)
dest_log = "C:\...\EfficientDet\logs\"
path_new = path.replace("logs/","")
path_new = path_new.replace(chr(92), "\")
path = dest_log+path_new
Turns out it was simply a path error. I hope this can help all windows users.
from efficientdet.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from efficientdet.
@noahtren
Sorry, I didn’t see the file set.py in the code. Could you send me this? Thank you!
from efficientdet.
when i run a inference.py i am getting a error as no module named compute_overlap
what to do? when we encounter this in inference.py
from efficientdet.
please reply back i need urgent reply
from efficientdet.
Related Issues (20)
- GPU usage is very low
- Quad model weight files HOT 1
- Error - ValueError: It appears you are trying to construct a functional model, but not all of the inputs in the first positional argument of your layer call are symbolic tensors. (Input objects, or the output of another layer) Functional models cannot correctly track custom layers unless all values in the first call argument are symbolic. HOT 5
- No visible results on evaluation HOT 3
- Can anyone help me to know the name of input and output node in efficientdet_d0 model HOT 2
- Unknown: IndexError: index 0 is out of bounds for axis 0 with size 0 while training at epoch 4 HOT 1
- Errors may have originated from an input operation. input size 896? HOT 1
- Error in BiFPN output HOT 1
- Quadrangles efficientnetlite HOT 1
- scores HOT 1
- Custom Dataset Training not starting HOT 2
- Exporting the full model HOT 1
- mAP=0 for eval/common.py HOT 1
- incorrect increment of self.level HOT 2
- Some advice about license compliance HOT 1
- Paper Question: Table 6 HOT 3
- ValueError: Unexpectedly found an instance of type `<class 'keras.engine.keras_tensor.KerasTensor'>`. Expected a symbolic tensor instance. HOT 3
- Could you please guide me label map file
- How to train on Custom dataset HOT 1
- Is it possible to do feature extraction using efficientDet? If possible please help me with the steps. I want to create a model concatenating features obtained from efficientdet and yolo nas
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 efficientdet.