dustysys / ddetailer

340 stars 74 forks source link

Models? #5

Closed StableInquest closed 1 year ago

StableInquest commented 1 year ago

How can I load models from here? https://github.com/open-mmlab/mmcv/blob/master/mmcv/model_zoo/open_mmlab.json

Thanks!

dustysys commented 1 year ago

To load official MMDetection pretrained models, pick one out from this list. image For those labelled 'Object Detection', place them in /models/mmdet/bbox. For those labelled 'Instance Segmentation', place them in /models/mmdet/segm.

You will need to download the model (.pth) and the config file (.py). Rename the model file to have the same name as the config file, mirroring the default ddetailer models. To download config files, click to view them and right click the 'Raw' button -> save link as. Here I grab the mmdet Mask2Former instance segmentation model as an example. image

The official MMDetection models tend to have additional config files required, listed at the top of the config file. image You will need to download those from the repo as well, scroll up from the model downloads to view the root path of these configs. Sometimes those config files will list even further config files you need from the mmdet repo. image Download any additional configs from the relative path in the repo. Modify the relative paths in a text editor so that they are just pointing to the current directory so you can just keep them in the models folder with your model. image After collecting all the dependency configs the model directory will look something like this: image Restart the webui for the model to appear in your list: image

StableInquest commented 1 year ago

Thanks so much, that's really helpful!

syddharth commented 1 year ago

where can one find the default_runtime.py ?

dustysys commented 1 year ago

@syddharth here: https://github.com/open-mmlab/mmdetection/blob/master/configs/_base_/default_runtime.py

soysanti commented 1 year ago

ohh this looks great, would there be a way to subtract the head (the B) and not just the face? also when it detects several bodies, to be able to define on which body we want to put the mask Thank you!