Open MitPitt opened 8 months ago
yes you can select specific obj classes
I can't get classes to show up.
When selecting this model I get WARNING ⚠️ Unable to automatically guess model task, assuming 'task=detect'. Explicitly define task for your model, i.e. 'task=detect', 'segment', 'classify','pose' or 'obb'.
thank you for your reporting I've just found very old mistake.
nsfwrecog_v1.onnx
has bug. it has wrong classes information and it needs workaround to get the right classes information.
you can add the following json
file in the models/yolo/
dir. make a new nsfwrecog_v1.json
file in the dir. uddetailer will automatically load this json
info to use it as classes info of the given model.
["EXPOSED ANUS",
"EXPOSED ARMPITS",
"COVERED BELLY",
"EXPOSED BELLY",
"COVERED BUTTOCKS",
"EXPOSED BUTTOCKS",
"FACE F",
"FACE M",
"COVERED FEET",
"EXPOSED FEET",
"COVERED BREAST F",
"EXPOSED BREAST F",
"COVERED GENITALIA F",
"EXPOSED GENITALIA F",
"EXPOSED BREAST M",
"EXPOSED GENITALIA M",
"EXPOSED BACK F",
"EXPOSED BACK M",
"DILDO"]
Another bug: neither nsfwrecog_v1 nor any other module that works with object classes will restore its configuration, even if it is saved using A1111's Setting > Other > Defaults > View changes > Apply sequence. This sequence saves changes to uddetailer's config into webui/ui-config.json. Most settings are restored, with the exception of object classes.
Here's what appears in the ui-config.json:
"txt2img/Object classes/value": [
< here goes the correct list of objects >
],
However, after A1111 is restarted, these object classes are not loaded. Moreover, as MitPitt commented last week, object classes do not even appear next to the combo box. One has to select a different detection model, then re-select nsfwrecog_v1 to just make the selection box show up, and then re-select all the object classes.
Suggestion: display object classification list correctly after restart; load object classes on startup.
Besides NSFW, it also detects face and covered parts of the body. Instead, it should be possible to choose which classes are to be censored.