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

Add sub sampler resnet18 #69

Merged

Conversation

MateoLostanlen
Copy link
Member

The goal of this PR is to add the SubSamplerResnet18 model which is a derivative of the resnet18 that we want to train on the SubSamplerDataSet of the PR #66

@MateoLostanlen MateoLostanlen requested a review from frgfm May 22, 2020 17:34
@MateoLostanlen MateoLostanlen added the module: models Related to models label May 22, 2020
@MateoLostanlen MateoLostanlen added this to In progress in PyroNear kanban via automation May 22, 2020
@codecov
Copy link

codecov bot commented May 22, 2020

Codecov Report

Merging #69 into master will increase coverage by 0.53%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
+ Coverage   85.21%   85.74%   +0.53%     
==========================================
  Files          20       21       +1     
  Lines         771      821      +50     
==========================================
+ Hits          657      704      +47     
- Misses        114      117       +3     
Flag Coverage Δ
#unittests 85.74% <100.00%> (+0.53%) ⬆️
Impacted Files Coverage Δ
pyronear/models/__init__.py 100.00% <100.00%> (ø)
pyronear/models/ssresnet.py 100.00% <100.00%> (ø)
pyronear/utils/collect_env.py 70.66% <0.00%> (-1.34%) ⬇️
pyronear/datasets/wildfire/split_strategy.py 97.29% <0.00%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61e6410...e4006c3. Read the comment docs.

@MateoLostanlen MateoLostanlen added the type: enhancement New feature or request label May 22, 2020
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Great PR! I made a few suggestions to get this to be easily reusable on other resnet-based achitecture, let me know what you think!

pyronear/models/ssresnet18.py Outdated Show resolved Hide resolved
pyronear/models/ssresnet18.py Outdated Show resolved Hide resolved
pyronear/models/ssresnet18.py Outdated Show resolved Hide resolved
@frgfm frgfm added this to the 0.1.1 milestone May 26, 2020
@MateoLostanlen
Copy link
Member Author

Hi @frgfm , Thanks for your remarks. It is indeed a good idea to generalize to any resnet. Let me know what you think of this new version

Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Almost there! you can define each ssresnet size like in torchvision and move weight loading outside of the class definition, check my comments, and we'll be good to go!

pyronear/models/ssresnet.py Outdated Show resolved Hide resolved
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This already looks good, I made a few suggestions to improve flexibility, let me know your thoughts on it!

pyronear/models/ssresnet.py Show resolved Hide resolved
pyronear/models/ssresnet.py Outdated Show resolved Hide resolved
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

A few minor adjustments for the final touch, and we're good to go!

test/test_models.py Outdated Show resolved Hide resolved
pyronear/models/ssresnet.py Outdated Show resolved Hide resolved
Copy link
Member

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Thanks a lot, looking forward to try it out!

PyroNear kanban automation moved this from In progress to Reviewer approved Jun 5, 2020
@MateoLostanlen MateoLostanlen merged commit eb46402 into pyronear:master Jun 5, 2020
PyroNear kanban automation moved this from Reviewer approved to Done Jun 5, 2020
@MateoLostanlen MateoLostanlen deleted the addSubSamplerResnet18 branch September 18, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: models Related to models type: enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants