This is the official repository (https://github.com/wingman-jr-addon/wingman_jr) for the Wingman Jr. Firefox addon, which filters NSFW images in the browser fully client-side: https://addons.mozilla.org/en-US/firefox/addon/wingman-jr-filter/ Optional DNS-blocking using Cloudflare's 1.1.1.1 for families! Also, check out the blog!
Load plugin via Firefox's "about:debugging" and select manifest.json
Hit "Inspect" and watch loading logs. See description at end for normal logs.
The test can be repeated by hitting "Reload" on "about:debugging". The first time has marginally longer times on my machine but all loads/reloads are similar in performance.
Now modify processor.js to enable setting the flag WEBGL_PACK_DEPTHWISECONV to false.
Hit "Reload" on "about:debugging" and watch the logs.
Environment:
Win 10 Home 21H1
Firefox 90.0 64 bit
ideapad FLEX5-1570
Processor Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz 2.90 GHz
Installed RAM 16.0 GB (15.9 GB usable)
System type 64-bit operating system, x64-based processor
Pen and touch Pen and touch support with 10 touch points
A typical "bad" log run. See "Ready to go at" as well as the timing's wallMs:
00:04:20.086 LIFECYCLE: Launching TF.js! processor.js:12:13
00:04:20.090 LIFECYCLE: Backend requested webgl processor.js:15:13
00:04:20.099
Object { IS_BROWSER: true, IS_NODE: false, DEBUG: false, WEBGL_VERSION: 2, HAS_WEBGL: true }
processor.js:24:13
00:04:20.100 LIFECYCLE: TensorflowJS backend is: webgl processor.js:28:13
00:04:20.101 LIFECYCLE: Loading model... processor.js:34:13
00:04:20.121 LIFECYCLE: Model load 13% at 453 processor.js:5:13
00:04:20.122 LIFECYCLE: Model load 25% at 454 processor.js:5:13
00:04:20.137 The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. processor.html
00:04:20.142 LIFECYCLE: Model load 38% at 475 processor.js:5:13
00:04:20.143 LIFECYCLE: Model load 50% at 475 processor.js:5:13
00:04:20.157 LIFECYCLE: Model load 63% at 489 processor.js:5:13
00:04:20.193 LIFECYCLE: Model load 75% at 525 processor.js:5:13
00:04:20.197 LIFECYCLE: Model load 88% at 529 processor.js:5:13
00:04:20.205 LIFECYCLE: Model load 100% at 537 processor.js:5:13
00:04:20.238 LIFECYCLE: Model loaded: [object Object] at 570 processor.js:36:13
00:04:20.238 LIFECYCLE: Warming up... processor.js:38:13
00:04:33.842
Array [ {…}, {…} ]
processor.js:42:13
00:04:33.843 LIFECYCLE: TIMING LOADING: {"uploadWaitMs":3358,"downloadWaitMs":0,"kernelMs":{"error":"WebGL query timers are not supported in this environment."},"wallMs":13603} processor.js:43:13
00:04:33.843 LIFECYCLE: Ready to go at 14175! processor.js:46:13
00:04:33.843 ALL MODEL LOADING COMPLETE!
A typical "good" run (with flag WEBGL_PACK_DEPTHWISECONV set to false):
00:10:26.854 LIFECYCLE: Launching TF.js! processor.js:12:13
00:10:26.860 LIFECYCLE: Backend requested webgl processor.js:15:13
00:10:26.868
Object { IS_BROWSER: true, IS_NODE: false, DEBUG: false, WEBGL_VERSION: 2, HAS_WEBGL: true, WEBGL_PACK_DEPTHWISECONV: false }
processor.js:24:13
00:10:26.869 LIFECYCLE: TensorflowJS backend is: webgl processor.js:28:13
00:10:26.870 LIFECYCLE: Loading model... processor.js:34:13
00:10:26.881 LIFECYCLE: Model load 13% at 487 processor.js:5:13
00:10:26.888 LIFECYCLE: Model load 25% at 494 processor.js:5:13
00:10:26.890 LIFECYCLE: Model load 38% at 496 processor.js:5:13
00:10:26.892 LIFECYCLE: Model load 50% at 498 processor.js:5:13
00:10:26.925 LIFECYCLE: Model load 63% at 531 processor.js:5:13
00:10:26.933 LIFECYCLE: Model load 75% at 539 processor.js:5:13
00:10:26.939 LIFECYCLE: Model load 88% at 544 processor.js:5:13
00:10:26.942 LIFECYCLE: Model load 100% at 547 processor.js:5:13
00:10:26.968 LIFECYCLE: Model loaded: [object Object] at 574 processor.js:36:13
00:10:26.968 LIFECYCLE: Warming up... processor.js:38:13
00:10:35.432
Array [ {…}, {…} ]
processor.js:42:13
00:10:35.433 LIFECYCLE: TIMING LOADING: {"uploadWaitMs":3123,"downloadWaitMs":0,"kernelMs":{"error":"WebGL query timers are not supported in this environment."},"wallMs":8462} processor.js:43:13
00:10:35.433 LIFECYCLE: Ready to go at 9040! processor.js:46:13
00:10:35.434 ALL MODEL LOADING COMPLETE!
To reproduce:
WEBGL_PACK_DEPTHWISECONV
to false.Environment: Win 10 Home 21H1 Firefox 90.0 64 bit
A typical "bad" log run. See "Ready to go at" as well as the timing's
wallMs
:A typical "good" run (with flag
WEBGL_PACK_DEPTHWISECONV
set to false):