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

module 'models.networks' has no attribute 'modify_commandline_options' #225

Open
bill1969 opened this issue Mar 17, 2022 · 2 comments
Open

Comments

@bill1969
Copy link

Running Stage 3: Face Enhancement
Traceback (most recent call last):
File "test_face.py", line 15, in
opt = TestOptions().parse()
File "E:\picture_fix\Bringing-Old-Photos-Back-to-Life\Face_Enhancement\options\base_options.py", line 262, in parse
opt = self.gather_options()
File "E:\picture_fix\Bringing-Old-Photos-Back-to-Life\Face_Enhancement\options\base_options.py", line 197, in gather_options
parser = model_option_setter(parser, self.isTrain)
File "E:\picture_fix\Bringing-Old-Photos-Back-to-Life\Face_Enhancement\models\pix2pix_model.py", line 12, in modify_commandline_options
networks.modify_commandline_options(parser, is_train)
AttributeError: module 'models.networks' has no attribute 'modify_commandline_options'
Finish Stage 3 ...

@WillianSalceda
Copy link

had the same problem following Installation guide

@FlowDownTheRiver
Copy link

FlowDownTheRiver commented Apr 26, 2022

The solution is I give you the folder structure,you need to have "sync_batchnorm" folder inside
"Bringing-Old-Photos-Back-to-Life\Face_Enhancement\models\networks" folder
so the final structure is going to be like in the picture.Make sure you don't overwrite any file.
2022-04-26 03_00_24-Window

I tell you what guys?
After stage 1 it is not worth to do the rest of the stages.Because it is using dlib for faces and even if you compile it with
cuda to run faster,it takes time to process the faces.What is worst is that the final results is not worth the time and processing power spent on it.

So I suggest you to edit the run.py file and comment out stage 2,3,4 for efficiency.

These are the original files :

6029756
Damaged-Photo-Restoration-before

These 2 are without face enhancement :

6029756
Damaged-Photo-Restoration-before

These 2 are with face enhancement :

6029756
Damaged-Photo-Restoration-before

For face enhancement you better use gfpgan or gpen.

For convenience edited run.py file:
run.zip

I have recorded 2 videos about this project is being used if you wanna watch:

https://www.youtube.com/watch?v=PK3Qpyld9fQ&t

https://www.youtube.com/watch?v=2gS0wzvWZuA&t

All credits goes to related project developers.

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

No branches or pull requests

3 participants