Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Error when running run_sample_training_pipeline.sh #28

Open
Testbild opened this issue Nov 10, 2021 · 9 comments
Open

Error when running run_sample_training_pipeline.sh #28

Testbild opened this issue Nov 10, 2021 · 9 comments

Comments

@Testbild
Copy link

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!

@matpalm
Copy link
Owner

matpalm commented Nov 11, 2021

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 :(

@Testbild
Copy link
Author

Testbild commented Nov 11, 2021

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?

@matpalm
Copy link
Owner

matpalm commented Nov 11, 2021 via email

@Testbild
Copy link
Author

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 😄

@matpalm
Copy link
Owner

matpalm commented Nov 11, 2021 via email

@Testbild
Copy link
Author

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
Copy link
Author

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

@matpalm
Copy link
Owner

matpalm commented Nov 17, 2021 via email

@matpalm
Copy link
Owner

matpalm commented Nov 17, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants