bnn icon indicating copy to clipboard operation
bnn copied to clipboard

Error when running run_sample_training_pipeline.sh

Open Testbild opened this issue 3 years ago • 9 comments

Hi @matpalm , that is an awesome project you have here. I struggle a bit to get it running. I did the following (on my windows 11 machine):

create a virtual environment with python -m venv install the requirements.txt in the virtual environement run the run_sample_training_pipeline.sh

The labeling tool opens and works fine with the sample images from you. When it then comes to the materialise_label_db.py the following error appears:

errormessage_new

So I tried to manually install skimage as it was reported missing. Then it said install scikit-image instead of skimage, but that is already satisfied.


(beeProject) C:\Users\Chrizzl\Documents\ObjectDetection\BeeProject\bnn>pip install skimage
Collecting skimage
  Downloading skimage-0.0.tar.gz (757 bytes)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\Chrizzl\Documents\ObjectDetection\BeeProject\beeProject\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Chrizzl\\AppData\\Local\\Temp\\pip-install-pu5o48n4\\skimage_31623e2a30784bacaced383f1d540476\\setup.py'"'"'; __file__='"'"'C:\\Users\\Chrizzl\\AppData\\Local\\Temp\\pip-install-pu5o48n4\\skimage_31623e2a30784bacaced383f1d540476\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Chrizzl\AppData\Local\Temp\pip-pip-egg-info-6acej1f8'
       cwd: C:\Users\Chrizzl\AppData\Local\Temp\pip-install-pu5o48n4\skimage_31623e2a30784bacaced383f1d540476\
  Complete output (3 lines):

  *** Please install the `scikit-image` package (instead of `skimage`) ***

  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3b/ee/edbfa69ba7b7d9726e634bfbeefd04b5a1764e9e74867ec916113eeaf4a1/skimage-0.0.tar.gz#sha256=6c96a11d9deea68489c9b80b38fad1dcdab582c36d4fa093b99b24a3b30c38ec (from https://pypi.org/simple/skimage/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement skimage (from versions: 0.0)
ERROR: No matching distribution found for skimage

(beeProject) C:\Users\Chrizzl\Documents\ObjectDetection\BeeProject\bnn>pip install scikit-image
Requirement already satisfied: scikit-image in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (0.18.3)
Requirement already satisfied: tifffile>=2019.7.26 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (2021.11.2)
Requirement already satisfied: PyWavelets>=1.1.1 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (1.2.0)
Requirement already satisfied: numpy>=1.16.5 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (1.21.4)
Requirement already satisfied: scipy>=1.0.1 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (1.7.2)
Requirement already satisfied: imageio>=2.3.0 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (2.10.3)
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,>=4.3.0 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (8.4.0)
Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (3.4.3)
Requirement already satisfied: networkx>=2.0 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from scikit-image) (2.6.3)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (2.8.2)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (3.0.5)
Requirement already satisfied: cycler>=0.10 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (1.3.2)
Requirement already satisfied: six>=1.5 in c:\users\chrizzl\documents\objectdetection\beeproject\beeproject\lib\site-packages (from python-dateutil>=2.7->matplotlib!=3.0.0,>=2.0.0->scikit-image) (1.16.0)

Hence the script stops and I cannot start the training. I feel like I am doing something rather obvious wrong. Maybe you can help me here.

Best regards and thank you!

Testbild avatar Nov 10 '21 16:11 Testbild

hmm. not sure sorry. it's been quite awhile since i've run this code so if skimage has been replaced with scikit-image i'd propbably see into the same thing myself now :(

matpalm avatar Nov 11 '21 03:11 matpalm

Ok I see. I think it is still correct to say

import skimage

but the pip install has to be scikit-image.

You do not have a docker container by any chance that has the versions of tensorflow and so on that you used when this was made that I could run?

EDIT: and did you run this project on linux or windows?

Testbild avatar Nov 11 '21 12:11 Testbild

i don't sorry, and the tensorflow version is a really good point, a number of things have changed in TF so i'd be unsure if it all runs...

On Thu, 11 Nov 2021 at 23:22, Testbild @.***> wrote:

Ok I see. I think it is still correct to say

import skimage

but the pip install has to be scikit-image.

You do not have a docker container by any chance that has the versions of tensorflow and so on that you used when this was made that I could run?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matpalm/bnn/issues/28#issuecomment-966259443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFILNPD7OVCJGEKR7QUHLULOYRZANCNFSM5HYIS64Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

matpalm avatar Nov 11 '21 18:11 matpalm

Do you by any chance remember the TF version that you used? I would assume TF1.x if I had to guess. Would be really nice, as we do have a real problem where we have to count bees 😄

Testbild avatar Nov 11 '21 19:11 Testbild

the version running on the rasp pi was 1.6; for training i would have been using whatever was current at the time

as a side note; this kind of project is exactly what i'm working on now as a day job now, so if you'd like to join the conversation at https://forum.edgeimpulse.com/t/pollen-on-bees-legs-baskets-detection/1730 (or start a new forum conversation) we'll love to hear about your requirements so we can build the features out to support you

On Fri, 12 Nov 2021 at 06:31, Testbild @.***> wrote:

Do you by any chance remember the TF version that you used? I would assume TF1.x if I had to guess. Would be really nice, as we do have a real problem where we have to count bees 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matpalm/bnn/issues/28#issuecomment-966568345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFILP7SC2HWOUKNOLSEO3ULQKYVANCNFSM5HYIS64Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

matpalm avatar Nov 11 '21 19:11 matpalm

Hi, sorry for the late reply. Do you have an E-Mail, where I can contact you?

I mainly do this for educational purposes, but maybe there is a chance to come together.

Testbild avatar Nov 17 '21 10:11 Testbild

Also I think I figured out the issue. The versions from the requirements.txt were mostly too new.

I created a conda environment with python 3.7 and installed the correct version (well versions with which the script runs through).

conda create -n beeProjectConda python=3.7

pillow
python-utils
scipy
scikit-learn
scikit-image
tensorflow==1.15
tensorflow-gpu==1.15
pyyaml==5.4.1
numpy==1.16.5
pywavelets==1.1.1
matplotlib==3.1.0

Is it normal, that there are no detection on the predicted images with only the 2 steps of training?

20180208_074854 jpg 20180210_121423 jpg

Thanks and best regards

Testbild avatar Nov 17 '21 11:11 Testbild

a forum post describing your use case will be your best bet, i'm not going to work on this project outside porting it to edge impulse

On Wed, 17 Nov 2021 at 21:35, Testbild @.***> wrote:

Hi, sorry for the late reply. Do you have an E-Mail, where I can contact you?

I mainly do this for educational purposes, but maybe there is a chance to come together.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matpalm/bnn/issues/28#issuecomment-971447740, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFILI42KUGKFSNDQ2BYY3UMOAQPANCNFSM5HYIS64Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

matpalm avatar Nov 17 '21 19:11 matpalm

yes it'll very likely take more than two steps. there is something coming through so it's hooked up!

On Wed, 17 Nov 2021 at 22:31, Testbild @.***> wrote:

Also I think I figured out the issue. The versions from the requirements.txt were mostly too new.

I created a conda environment with python 3.7 and installed the correct version (well versions with which the script runs through).

conda create -n beeProjectConda python=3.7

pillow python-utils scipy scikit-learn scikit-image tensorflow==1.15 tensorflow-gpu==1.15 pyyaml==5.4.1 numpy==1.16.5 pywavelets==1.1.1 matplotlib==3.1.0

Is it normal, that there are no detection on the predicted images with only the 2 steps of training?

[image: 20180208_074854 jpg] https://user-images.githubusercontent.com/9366108/142192709-755ff1b5-6d11-438e-9740-bbad83ec6599.png [image: 20180210_121423 jpg] https://user-images.githubusercontent.com/9366108/142192724-782f9641-46da-4b6b-832c-d3e9884be1bd.png

Thanks and best regards

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matpalm/bnn/issues/28#issuecomment-971488935, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFILPTJN7FIW7V2VDILXTUMOHCVANCNFSM5HYIS64Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

matpalm avatar Nov 17 '21 19:11 matpalm