Bird model #616
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 7 replies
-
Hi @sergewich! It's definitely possible to run the bird model on orthomosaics, that's one of our primary personal use cases and as a result of the lot the training data is from orthos as well. The big question is probably whether this is working in R since we've had a number of issues on and off with keeping the R wrapper working across operating systems. Here are the instructions from predicting on an ortho in the R wrapper: https://github.com/weecology/deepforestr?tab=readme-ov-file#predict-a-tile. If this isn't working for you can you let us know what operating system you're using and show us the error. |
Beta Was this translation helpful? Give feedback.
-
Keep us updated here, I have been working on a bird model tutorial that hasn't been merged into docs. what's your use case? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I should have made that clear. I am trying to install package in Python so am running the windows command or anaconda prompt. I tried the various installation options that you suggest on Github and all of them run into issues with either solving environment or pywheels. I realise it is extremely difficult to troubleshoot from afar. I have a colleague who works a lot with Python so plan to ask for his help potentially if need be. But any thoughts that you have on how to solve this are very welcome as I am keen to get this working. |
Beta Was this translation helpful? Give feedback.
-
Many thanks. Just this morning I managed to install it but with Python
3.9. Should I update this to 3.11? If so I need to see how I do that.
I am running into issues when loading the sample image OSBS_029.png.
TypeError Traceback (most recent call last)
Cell In[11], line 1----> 1 img =model.predict_image(sample_image_path,return_plot=True)
File ~\anaconda3\envs\deepforest\lib\site-packages\deepforest\main.py:334, in deepforest.predict_image(self, image, path, return_plot, color, thickness) 332# sanity checks on input images 333ifnottype(image) == np.ndarray:
--> 334raiseTypeError("Input image is of type {}, expected numpy, if reading " 335"from PIL, wrap in " 336"np.array(image).astype(float32)".format(type(image)))
338if image.dtype !="float32":
339 warnings.warn(f"Image type is {image.dtype}, transforming to float32. " 340f"This assumes that the range of pixel values is 0-255, as " 341f"opposed to 0-1.To suppress this warning, transform image " 342f"(image.astype('float32')")
TypeError: Input image is of type <class 'str'>, expected numpy, if reading from PIL, wrap in np.array(image).astype(float32)
I will try to figure out why that is. Maybe the image is not loading? I tried with my own images and get the same issue.
…------ Original Message ------
From: "Ethan White" ***@***.***>
To: "weecology/DeepForest" ***@***.***>
Cc: "sergewich" ***@***.***>; "Mention"
***@***.***>
Sent: 07/03/2024 12:05:01
Subject: Re: [weecology/DeepForest] Bird model (Discussion #616)
Thanks. So this doesn't work for you?
pip install deepforest
Assuming that let's try a standard install into a conda environment.
Open the Anaconda prompt and try running the following:
conda create -n deepforestenv python=3.11
conda activate deepforestenv
pip install deepforest
—
Reply to this email directly, view it on GitHub
<#616 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMOU2MO6T4QXOWUWPDHDCBTYXBJW3AVCNFSM6AAAAABEFNCQYGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMBWGQYTA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Super, it works now. Many thanks. I will try the bird model as well and
let you know how it goes.
…------ Original Message ------
From: "Ethan White" ***@***.***>
To: "weecology/DeepForest" ***@***.***>
Cc: "sergewich" ***@***.***>; "Mention"
***@***.***>
Sent: 07/03/2024 13:00:42
Subject: Re: [weecology/DeepForest] Bird model (Discussion #616)
Trying adding an explicit name to the first argument like shown at the
top of the getting started page:
https://deepforest.readthedocs.io/en/latest/getting_started.html
—
Reply to this email directly, view it on GitHub
<#616 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMOU2MI7EN2LWLF36KNGIWLYXBQHVAVCNFSM6AAAAABEFNCQYGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOMBXGA2TA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Glad things are working for you now! If you're in good shape feel free to go ahead and close this. You can always open a new issues/discussion if you have more questions. Also, definitely let us know how things go with the results! |
Beta Was this translation helpful? Give feedback.
Thanks. So this doesn't work for you?
Assuming that let's try a standard install into a conda environment. Open the Anaconda prompt and try running the following: