Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create YOLACT++ Google Colaboratory demo #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrm8488
Copy link

@mrm8488 mrm8488 commented Dec 17, 2019

I think this is so helpful to get people into YOLACT/YOLACT++ in the easiest way!
Just one click and everything is ready :)

@mrm8488 mrm8488 changed the title Create yolact++ Gooble Colaboratory demo Create yolact++ Google Colaboratory demo Dec 17, 2019
@mrm8488 mrm8488 changed the title Create yolact++ Google Colaboratory demo Create YOLACT++ Google Colaboratory demo Dec 17, 2019
@abhigoku10
Copy link

@mrm8488 where is the google colab file , is it only the inference pipeline or even training is available . Wonderful thought in getting into the colab

@mrm8488
Copy link
Author

mrm8488 commented Dec 18, 2019

It's in the root dir. It's for inference.

@abhigoku10
Copy link

@mrm8488 thanks a lot i was looking into wrong directory

Copy link
Contributor

@breznak breznak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mrm8488 , this a is great work! 👍 Thanks for setting the Collab up.

I've tested and reviewed your PR,

  • mostly some formatting improvement suggestions
  • I got the image upload fail on me (FF, linux)
    • would be good to include some out of the box images to test (already avail in the repo)

"colab": {}
},
"source": [
"!mkdir weights"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we merge the

git clone
cd yolact
mkdir weights

into one execution block?

"colab": {}
},
"source": [
"cd external/DCNv2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be part of the section below

"# Compile deformable convolutional layers (from DCNv2) to use YOLACT++ version"

"colab_type": "text"
},
"source": [
"# Download the model weights"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might add more details from the Readme, ie the different pretrained nets and their FPS/mAP as a documentation here. Ofc only one net is downloaded

"colab": {}
},
"source": [
"from google.colab import files\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting an err executing this cell:

Upload widget is only available when the cell has been executed in the current browser session. Please rerun this cell to enable.

---------------------------------------------------------------------------

MessageError                              Traceback (most recent call last)

<ipython-input-12-354be791d27e> in <module>()
      1 from google.colab import files
      2 
----> 3 uploaded = files.upload()
      4 pic_names = list(uploaded.keys())
      5 for pic_name in pic_names:

2 frames

/usr/local/lib/python3.6/dist-packages/google/colab/_message.py in read_reply_from_input(message_id, timeout_sec)
    104         reply.get('colab_msg_id') == message_id):
    105       if 'error' in reply:
--> 106         raise MessageError(reply['error'])
    107       return reply.get('data', None)
    108 

MessageError: TypeError: google.colab._files is undefined


Running on FF on linux

"colab_type": "text"
},
"source": [
"# Detect objects in the uploaded pictures"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...as the custom image upload may fail, offer a cell running detection on already available image(s) in the repo.

@dbolya
Copy link
Owner

dbolya commented Jan 24, 2020

I think this is a great idea! It looks like Adam Kelly has also created a collab notebook that also has video support: https://colab.research.google.com/drive/1ncRxvmNR-iTtQCscj2UFSGV8ZQX_LN0M
(Blog post here: https://www.immersivelimit.com/tutorials/yolact-with-google-colab)

Should we merge the functionality of both notebooks?

@breznak
Copy link
Contributor

breznak commented Jan 25, 2020

I'm not sure if the author of this PR is still active, @mrm8488 ?

Anyway, the Adam's notebook worked great for me!

Adam Kelly has also created a collab notebook that also has video support: https://colab.research.google.com/drive/1ncRxvmNR-iTtQCscj2UFSGV8ZQX_LN0M
(Blog post here: https://www.immersivelimit.com/tutorials/yolact-with-google-colab)

  • is there an OSS licence to the file?
  • can we add it to the repo? (so we can make modifications)

@dbolya
Copy link
Owner

dbolya commented Feb 5, 2020

@breznak He reached out to me about the existence of it, so I can ask him. Worst case we can just link it right? Or is it better to have it in the repo (in which case we can roll our own / update this one).

@mrm8488
Copy link
Author

mrm8488 commented Feb 5, 2020

Ofc, you can do you decide with my PR. License is the same as this repo.

@breznak
Copy link
Contributor

breznak commented Feb 5, 2020

Worst case we can just link it right?

true, we can always put a link in the Readme.

Or is it better to have it in the repo (in which case we can roll our own / update this one).

imho slightly better:

  • we can manage updates/fixes to the file
  • google warns that "you are executing a 3rd party ipython notebook from xxx" (it'd be better to have this repo as "author" rather than another nick)

@abhigoku10
Copy link

@mrm8488 @breznak @dbolya hi thanks for opensourcing and sharing the colab to run the yolact++ but when i try to do the same by myself by creating a repo and uploading all the files and changing the git clone from author to my repo and run it i get error in evaluation as mentioned below "File "/content/yolact_adas/backbone.py", line 11, in DCN
raise Exception('DCN could not be imported. If you want to use YOLACT++ models, compile DCN. Check the README for instructions.')
Exception: DCN could not be imported. If you want to use YOLACT++ models, compile DCN. Check the README for instructions." is it not possbile to do it ?? or should we perform only authors repo

@SnehashishSrivastava
Copy link

really interesting and helpful

@breznak
Copy link
Contributor

breznak commented Sep 30, 2021

@dbolya can we merge this?

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

Successfully merging this pull request may close these issues.

None yet

5 participants