Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Add support for Python 2 #11

Merged
merged 8 commits into from
Oct 26, 2018
Merged

Add support for Python 2 #11

merged 8 commits into from
Oct 26, 2018

Conversation

fmassa
Copy link
Contributor

@fmassa fmassa commented Oct 25, 2018

This PR adds support for Python 2, and should fix #7

I've successfully run tools/train.py and tools/test.py after these fixes, and training / inference succeeded without errors.

I'll run a quick schedule train/test cycle to verify that the numbers match the expected results.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 25, 2018
@fmassa
Copy link
Contributor Author

fmassa commented Oct 25, 2018

Thanks for the review @rbgirshick !

I'm performing some full trainings to verify that accuracy is the same.
Training on the reduced scheduled gave expected results, as well as inference on pre-trained models.
Once I verify that this works as expected on the full training I'll merge it.

@fmassa
Copy link
Contributor Author

fmassa commented Oct 26, 2018

Here are the results for training on Mask R-CNN R-50 FPN 1x. Accuracies match the baselines, and it seems that the Python 2 runtime is a bit slower. I've run it twice.

backbone type lr sched im / gpu train mem(GB) train time (s/iter) total train time(hr) inference time(s/im) box AP mask AP model id
R-50-FPN Mask 1x 2 5.2 0.4657 11.6 0.13757 + 0.034 37.7 34.3 6486235
R-50-FPN Mask 1x 2 5.2 0.4670 11.6 0.14075 + 0.034 37.6 34.2 6486657

I'm merging this.

@fmassa fmassa merged commit c56832e into master Oct 26, 2018
@fmassa fmassa deleted the py2_support branch October 26, 2018 06:55
@engineer1109 engineer1109 mentioned this pull request Dec 20, 2018
nprasad2021 pushed a commit to nprasad2021/maskrcnn-benchmark that referenced this pull request Jan 29, 2019
* Add missing __init__.py files

* Add packages

* Rename logging.py to logger.py

Import rules from Python2 makes this a bad idea

* Make import_file py2 compatible

* list does not have .copy() in py2

* math.log2 does not exist in py2

* Miscellaneous fixes for py2

* Address comments
@Jacobew Jacobew mentioned this pull request Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: coercing to Unicode: need string or buffer, list found
3 participants