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

Implementing YOLOv3 architecture #1695

Closed
wants to merge 6 commits into from
Closed

Conversation

wuhy08
Copy link
Contributor

@wuhy08 wuhy08 commented Nov 21, 2019

Hi MMlab,

I am Haoyu Wu, an employee at Western Digital. I have implemented the YOLOv3 architecture in the mmdetection framework. Hope that is helpful to community. It is noted that the contribution comes from my work at Western Digital, therefore each files have a header of copyright claims. But we agree to use Apache 2.0 license.

I have pretrained weight file. I wonder what is the best way to share that.

Thank you!

@zxz-cc
Copy link

zxz-cc commented Jan 15, 2020

Hi MMlab,

I am Haoyu Wu, an employee at Western Digital. I have implemented the YOLOv3 architecture in the mmdetection framework. Hope that is helpful to community. It is noted that the contribution comes from my work at Western Digital, therefore each files have a header of copyright claims. But we agree to use Apache 2.0 license.

I have pretrained weight file. I wonder what is the best way to share that.

Thank you!

Where is the pretrained weight file??

@liugl7
Copy link

liugl7 commented Jan 18, 2020

please give the download link to "darknet_state_dict_only.pth"

@liugl7
Copy link

liugl7 commented Jan 18, 2020

Hi MMlab,

I am Haoyu Wu, an employee at Western Digital. I have implemented the YOLOv3 architecture in the mmdetection framework. Hope that is helpful to community. It is noted that the contribution comes from my work at Western Digital, therefore each files have a header of copyright claims. But we agree to use Apache 2.0 license.

I have pretrained weight file. I wonder what is the best way to share that.

Thank you!

please give the download link to "darknet_state_dict_only.pth"
thank you very much !

@ElectronicElephant
Copy link
Contributor

@wuhy08 Hello, great thanks to your contribution. Would you please offer a download link to the pretrained model?

@ElectronicElephant
Copy link
Contributor

ElectronicElephant commented Feb 19, 2020

@CRmost @liugl7
You can try

https://drive.google.com/file/d/1-59qCzvSOCvVFCQ9HDggHA8xUQFR4LDx/view?usp=sharing

, which is extracted from the author's another repo.

If you get things right, please let me known. Thank you.

@xvjiarui xvjiarui self-requested a review March 9, 2020 11:32
@xvjiarui
Copy link
Collaborator

Hi @wuhy08
Thanks for your contribution and sorry for the delay.
Could you please clean up the comment in the config files?

Clean the comments in config file
@wuhy08
Copy link
Contributor Author

wuhy08 commented Mar 12, 2020

Hi @xvjiarui

I cleaned the comments in the config file. The init files have some conflicts. I wonder how to deal with that.

@xvjiarui
Copy link
Collaborator

Hi @wuhy08
You could try git merge open-mmlab master to solve conflicts from your side.

@xvjiarui
Copy link
Collaborator

@wuhy08
Also, it would be nice if I could have the link to your pre-trained weight and trained model so that I could work on reproducing.
READMD.md is suggested to included under the configs/yolo, where you could also provide your links and results.

@xvjiarui
Copy link
Collaborator

Hi @wuhy08
FYI, ConvModule is just refactored in #2239, which could be used to replace ConvLayer in your implementation.

@wuhy08
Copy link
Contributor Author

wuhy08 commented Mar 12, 2020

@xvjiarui

I will try to merge your current master to my branch, resolve any conflict, and test it. It might take a few days. I will let you know by then.

# Conflicts:
#	mmdet/models/anchor_heads/__init__.py
#	mmdet/models/necks/__init__.py
#	mmdet/models/utils/__init__.py
@GreenTeaHua
Copy link

everything is ok?

@wuhy08
Copy link
Contributor Author

wuhy08 commented Mar 26, 2020

Hi @xvjiarui

Sorry for the delay due to coronavirus. But I pushed more commits to get it streamlined. I haven't use your new ConvModule since it require substantial amount of work including retraining/state_dict converting. So I will leave it for other contributors. I also uploaded my training checkpoint to Google Drive, linked in README. I hope that can be stored in your centralized storage in case it is unintentionally deleted. I am not authorized to merge so I think some conflicts have to be resolved by authorized merger.

Thank you and stay healthy!

@miaoshuyu
Copy link

@wuhy08
hi, I run your code and miss this problem, do you know why.
RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing its output (the return value of forward). You can enable unused parameter detection by passing the keyword argument find_unused_parameters=True to torch.nn.parallel.DistributedDataParallel. If you already have this argument set, then the distributed data parallel module wasn't able to locate the output tensors in the return value of your module's forward function.

@CLAassistant
Copy link

CLAassistant commented May 21, 2020

CLA assistant check
All committers have signed the CLA.

@hasanirtiza
Copy link
Contributor

@miaoshuyu
If you have not solved it already, at line 132 of mmdet/apis/train.py, when he is calling
model = MMDistributedDataParallel(model.cuda(), device_ids=[torch.cuda.current_device()], broadcast_buffers=False])

add an additional argument find_unused_parameters=True.

model = MMDistributedDataParallel(model.cuda(), device_ids=[torch.cuda.current_device()], broadcast_buffers=False, find_unused_parameters=True)

This was referenced Jun 18, 2020
hellock pushed a commit that referenced this pull request Aug 31, 2020
* Implement YOLOv3

* Remove unused function

* Update yolov3_ms_aug_273e.py

Clean the comments in config file

* Add README.md

* port to mmdet-2.0 api

* unify registry

* port to ConvModule and remove ConvLayer

* Refactor Backbone

* Update README

* Lint and format

* Unify the class name

* fix the `label - 1` problem

* Move a lot hard-coded params to the __init__ function

* Refactor YOLOV3Neck

* Add norm_cfg and act_cfg to backbone

* Update Config

* Fix doc string

* Fix nms (thanks to @LMerCy)

* Add doc string

* Update config

* Remove pretrained in head and neck

* Add support for conv_cfg in neck

* Update mmdet/models/dense_heads/yolo_head.py

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* Update mmdet/models/dense_heads/yolo_head.py

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* Fix README.md

* Fix typos

* update config

* flake8, yapf, docformatter, etc

* Update README

* Add conv_cfg to backbone and head

* Move some config to arch_settings in backbone

* Add doc strings and replace Warning with warnings.warn()

* Fix bug.

* Update doc

* Add _frozen_stages for backbone

* Update mmdet/models/backbones/darknet.py

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* Fix inplace bug

* fix indent

* refactor config

* set 8GPU lr

* fixed typo

* update performance table

* Resolve conversation

* Add anchor generator and coder

* fixed test

* Finish refactor

* refactor anchor order

* fixed batch size

* Fixed train_cfg

* fix yolo assigner

* clean up

* Fixed format

* Update model zoo

* change to mmcv pretrain link

* add test forward

* fixed comma and docstring

* Refactor loss

* reformat

* fixed avg_factor

* revert to original

* fixed format

* update table

* fixed BCE

Co-authored-by: Haoyu Wu <haoyu.wu@wdc.com>
Co-authored-by: Haoyu Wu <wuhy08@users.noreply.github.com>
Co-authored-by: Haoyu Wu <wuhaoyu1989@gmail.com>
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
Co-authored-by: xmpeng <1051323399@qq.com>
@ZwwWayne
Copy link
Collaborator

Since YOLOv3 is supported by #3083. This PR is closed. Thanks for your contribution.

@ZwwWayne ZwwWayne closed this Oct 14, 2020
@OpenMMLab-Assistant-004

Hi @wuhy08 !We are grateful for your efforts in helping improve mmdetection open-source project during your personal time.

Welcome to join OpenMMLab Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA
If you have a WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)

Thank you again for your contribution❤

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.