tf-faster-rcnn on Windows - python

Has anyone implement the Faster-RCNN for TensorFlow version on Windows?
I found some related repos as following:
1.Faster-RCNN for TensorFlow on Linux
https://github.com/endernewton/tf-faster-rcnn
2.Faster-RCNN for Caffe on Linux
https://github.com/rbgirshick/py-faster-rcnn
3.Faster-RCNN for Caffe on Windows
https://github.com/MrGF/py-faster-rcnn-windows
I successfully compiled the 'cpu_nms',but encountered error when trying to run demo.py:
tensorflow.python.framework.error_impl.InvalidArgumentError:ValueError:Buffer dtype mismatch, expected 'int_t' but got 'long long'
PS.Didn't compile gpu_nms cuz I don't know how to deal with 'kernel.cu' and 'gpu_nms.pyx'.I tried to do like what https://github.com/MrGF/py-faster-rcnn-windows did on 'setup_cuda.py' but failed, an error exactly the same as https://github.com/MrGF/py-faster-rcnn-windows/issues/17 happened:
LINK : fatal error LNK1181: cannot open input file 'ID=2.obj'
Has anyone implement the Faster-RCNN for TensorFlow version on Windows or can anyone give me some advice?
Thanks a lot.

LINK : fatal error LNK1181: cannot open input file 'ID=2.obj'
This error comes from the link command. In the command string, there's a segment 'ID=2.obj'. You can fix it by removing the string segment.

Related

Error when running code using pickle load

I'm doing my code exactly the same with https://www.youtube.com/watch?v=y1ZrOs9s2QA&t=4124s in minute 1:11:09.
I write this code :
pickle_in = open("venv/model_trained.p","rb")
model = pickle.load(pickle_in)
It showed an error like this when I tried to run it.
Error that I got after running the code
Is someone having the same issue as me?
Thank you.
Best Regards,
Bhetrand
Never mind, I solved it, the problem is on the python version that doesn't support TensorFlow version 2.0.0, I guess pickle can work well in TensorFlow 2.0.0 and we need the python version 3.5- 3.7 to run tensor flow 2.0.0.

ERROR WHEN IMPORTING PYTORCH (The filename or extension is too long)

I'm using Anconda to run my Transformers project locally in google colab.
I've created a new environment (tf_gpu) and installed (supposedly) everything I need.
And everything works fine, but when I try to simply import pytorch, this error appears:
[WinError 206] The filename or extension is too long: 'C:\\Users\\34662\\anaconda3\\envs\\tf_gpu\\lib\\site-packages\\torch\\lib'
When clearly the path is not long enough to trigger this error.
My python version is 3.8, and my GPU is a Nvidia GeForce GTX 1650, so it shouldn't be a GPU problem
Does anybody knows why this happens?
Any help is good at this point, I don't know how to solve this.
Here I leave a screenshot of the complete error message
Thank you in advance.
Your problem is that the error ist not a too long path error it is a file not found error which mean that pytorch is not correctly installed

Unable to save a trained network: " KeyError: 'predictions_ib-0' "

I was trying to save a trained model using my_model.save('path/file.h5'). However, I obtained an error message: KeyError: 'predictions_ib-0'
I did some research but could not find a solution. I put my code on Github and the link is down below. The error shows up at In[39]
https://github.com/xizhenke/test2/blob/master/demo-Copy1.ipynb
Please give me some suggestions, thank you in advance!
I did more research and found it seems to be an "on-going" bug of the latest Keras (2.2.0+). So what I ended up doing was down-grading Keras to 2.1.6. And it works like a charm. I hope this could help people who have a similar issue.
Make sure you use pip or conda to down-grade. Or you may run into a package dependency issue.

Tensorflow python AI (tutorial by sentdex error)

i am trying 2 get a AI via the AI course by Sentdex i didnt get the install working at first, got the mac version (i am using win) then i try running the prepeare file in the setup dir and it gives me this error:
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
anyone know what 2 do?

Error "ValueError: bad marshal data (unknown type code)" with Python 2.7.13 and Keras 2.0.8

I get the ValueError: bad marshal data (unknown type code) above when trying to load a previously saved Keras model (I think it's a Python error though that has nothing to do with Keras, but not quite sure.)
from keras.models import load_model
from keras import __version__ as keras_version
model = load_model("model.h5")
I searched on Google but didn't find a working solution. I tried deleting pya-files with: sudo find /usr -name '*.pyc' -delete but that didn't help either.
Do you have an idea how I can fix this error? Thank you!
I know the post is a bit older, but I just ran into the same problem.
As #Daniel Möller said, it was because I had installed different versions of Python, Tensorflow and Keras. Try to train the model again, in the same environment that you use to load the model afterwards. Or at least make sure that the Python version and the modules used are installed in the same version.

Categories

Resources