halcy / DeepDanbooruActivationMaps

Scripts to calculate interest regions for tags for the DeepDanbooru tagger model
34 stars 1 forks source link

Doesn't work with Tensorflow 2 #4

Closed mrvacbob closed 4 years ago

mrvacbob commented 4 years ago

I came back to this and realized the notebooks don't run with tensorflow 2. Sad!

mrvacbob commented 4 years ago
import tensorflow.compat.v1 as tf
import tensorflow.compat.v1.keras.backend as K

This seems to help, I assume performance is worse in some way though.

halcy commented 4 years ago

If you're going to try to fix it, I'd recommend just starting fresh and trying to get a similar workflow going with gwerns Stylegan2 model (which has a built in embedding network). I've been meaning to, but I have exactly zero brain power left over after work recently.

edit: wait shit nvm wrong repo. This doesn't use stylegan. disregard this.

mrvacbob commented 4 years ago

Using compat did fix it. The deepdanbooru project might have a gradcam tool built in though, so maybe this project is obsolete.

halcy commented 4 years ago

Alright, and yeah, if you can use the original authors repo, definitely do. This was a stopgap as at the time the original model existed only as a CNTK thing.