DeepForest
DeepForest copied to clipboard
Build hugging faces tutorial
I think its time we have a gradio app on hugging faces. Can we clone this app and edit from there?
https://huggingface.co/spaces/AndresHdzC/pytorch-wildlife
I think this is a 'good first issue', in the sense it won't take much DeepForest knowledge, but it will take some experience with hugging faces.
Steps
- Clone https://huggingface.co/spaces/AndresHdzC/pytorch-wildlife/blob/main/app.py
- Integrate the getting started tutorial for birds and tree models.
- Show screenshots from local gradio app
- Get clearance from @ethanwhite for huggingfaces space
- Upload and test Connected to model hosting issue #317 and GSOC conversation #628
- Would we want to use predict_image or predict_tile? No way to know what size of images to upload, we will need some kind of instruction or logic to guess whether we need to cut images into pieces.
Anyone looking for a somewhat more complex issue that is still manageable without a deep understanding of the code base - this is a good one. Enjoy!
I have issued a Pull request for this issue. I have completed the first three steps. Can you please elaborate on the 5th step? Also can you please tell me if I have missed out on anything? Thanks!
@Om-Doiphode - can you send me your huggingface username so I can add you to our organization so you can upload this to the right place
@bw4sz is there cost associated with this?
@Om-Doiphode - can you send me your huggingface username so I can add you to our organization so you can upload this to the right place
Yeah sure. Following is my username: HawkeyeHS (https://huggingface.co/HawkeyeHS)
Hi @ethanwhite, I have accepted the invite to Hugging Face, how can I push the app to the Hugging Face spaces? Should I push it using my API key since in the organization's settings it says that the organization API tokens have been deprecated and to migrate the system to use User Access Tokens?
@Om-Doiphode - I've created a huggingface space for this. It's a git repo and there are instructions on the page for getting linked up to it so that you can push your draft app:
https://huggingface.co/spaces/weecology/deepforest-demo
If you don't have a git history you can just follow the instructions at that link. If you already have a git history for this project that you'd like to keep let me know and I can walk you through how to connect your local repo to huggingface directly instead of following the instructions for cloning.
Hi @ethanwhite, thank you for creating the space. I have pushed my draft app on the space, please review it. Thanks!
Looks great to me! Can you add a mention of this to the docs?
@bw4sz - take a look when you get the chance and see what you think
Great start!
- Let's increase the default thickness for predict birds, in predict_tile, thickness = 3? The predictions right now are hard to see, they are there if you squint. We might need some logic for the thickness. If the image is less than 1000 pixels, thickness is 1, over 1000 thickness = 2, more than 5000, thickness = 3?
- we want to format the errors to show users how they can fix any test images. For example, right now it gives 'error'. it should return the error.
- We should point to this on the landing page. https://github.com/weecology/DeepForest/blob/main/docs/landing.md
Looks great to me! Can you add a mention of this to the docs?
@bw4sz - take a look when you get the chance and see what you think
I have added the link to the app in the docs in the Getting Started and Prebuilt models sections. I have also added error handling for model prediction.