-
Notifications
You must be signed in to change notification settings - Fork 813
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
adding the YOLACT instance segmentation model #1067
Conversation
Thank you for your contribution. Before we do the review please do the self-check first (copy the list and tick the item when it's done):
|
And it shouldn't be as submodule but committed directly :) |
@adrianboguszewski Thanks for the feedback, I will be working on the changes. |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@adrianboguszewski
here's a screenshot of running it locally and the fork repo has it run too. |
@adrianboguszewski the docker treon check faild, however the notebook that did was not mine. |
Docker treon failing is not related to your work. However, the code check CI is. Please fix all flake8 bugs. You can run it locally to see where to improve the code style. See these instructions |
Two more comments:
|
The model does need all of those, the original model was even more complex and had multiple dependencies to multiple directories. |
@adrianboguszewski I have some changes and the code check passed, however there's some error regarding Binder that I don't get. |
@adrianboguszewski the drive is not mine, it's available on the the main repo of the model, I can set it up on my drive for now, however I don't know if that will be suitable. as for the mixed areas problem, I will try to to work on but I might need some help. |
If it's points to the main repo, please find a way to skip that access denied error |
@aleksandr-mokrov @eaidova any updates? |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-01-23T00:47:08Z Line #6. from data.config import cfg, set_cfg No need to copy whole project. Just clone it and set path, like this: yolact_repo = 'yolact' There are no something that you need to change. |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-01-23T00:47:09Z Line #16. sys.path.append('..') Replace by import urllib.request |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-01-23T00:47:10Z Line #8. output_path = f"{WEIGHTS_PATH}/{MODEL_NAME}.pth" Check if the path exists. |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-01-23T00:47:11Z Line #7. model_path = SavePath.from_str(args.trained_model) Why do you use class |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-01-23T00:47:12Z Line #10. set_cfg(args.config) Make sure the resulting cfg has the desired attributes |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-01-23T00:47:13Z Line #32. preds = net.detect({'loc': dets_out[0], 'conf': dets_out[1], 'mask':dets_out[2], 'priors': dets_out[3], 'proto': dets_out[4]}, net) Use original model output and remove this line. You can create wrapper class for convertation, for example: class ModelWrapper(torch.nn.Module): Or replace the detection method by method that only returns required output. aleksandr-mokrov commented on 2024-01-23T18:23:47Z An example implementation of the last option to keep the same behavior but not change the source code:
def detect(pred_outs, net): return pred_outs['loc'], pred_outs['conf'], pred_outs['mask'], pred_outs['priors'], pred_outs['proto'] |
@Abdullah-Elkasaby currents PR affects a lot of files that are not relevant to current example. Looks like you merged main into you branch in the wrong way. |
I don't see the conficts on my side idk why |
There are no conflicts. Problem is that there changes that affects a lot of files from other notebooks. This happens when you do not resolve the conflict manually correctly. I believe that the problem in this commit: ed491f3 |
790f647
to
82f6fad
Compare
I have reverted back those changes, it should be up to date with the current repo now |
Great! Check also files under .github/workflows diretory and .docker/Pipfile.lock. And resolve comments starting with https://app.reviewnb.com/openvinotoolkit/openvino_notebooks/pull/1067/discussion/#comment-1905093771. It will simplify this example. |
I have made the changes regarding making the code related to initilazing the model to the same as the one used in the original model. However, I don't understand your comment about github workflows and docker directory, could you please clarify? |
There are a lot of copied files from yolact repository. Some of them has some changes. It is possible to avoid it. I left tips on how to do this. Such as cloning a repository and making changes to objects rather than files. I checked it and it works. There are few changes required to the notebook, but we eliminate the need to bring a bunch of third-party files into our repository.
Look into "File changed" tab. There are changes in github workflows and docker directory. These changes should not happen. |
An example implementation of the last option to keep the same behavior but not change the source code:
def detect(pred_outs, net): return pred_outs['loc'], pred_outs['conf'], pred_outs['mask'], pred_outs['priors'], pred_outs['proto'] View entire conversation on ReviewNB |
@Abdullah-Elkasaby any updates here on requested changes? |
This PR will be closed in a week because of 2 weeks of no activity. |
This PR was closed because it has been stalled for 2 week with no activity. |
No description provided.