Perceptual image filtering plugin

Post plugins and custom CSS snippets here
User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Perceptual image filtering plugin

Postby fox » 19 Jul 2016, 13:16


User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Perceptual image checking plugin

Postby sleeper_service » 20 Jul 2016, 02:44

I must be missing something, using PG, installed php_gd, plenty memory and space... cloned into plugins.local, imported schema. using a fresh pull of the main ttrss.

but I don't see the plugin anywhere, on the user, or system plugin list, or on the feed plugin tab.

I don't see it listed in output of update.php --list-plugins either.

don't see any errors on the web server logs, or in ttrss logs.

hint what I might be missing?

JustAMacUser
Bear Rating Overlord
Bear Rating Overlord
Posts: 373
Joined: 20 Aug 2013, 23:13

Re: Perceptual image checking plugin

Postby JustAMacUser » 20 Jul 2016, 03:15

I think the PHP class name (Af_Zz_Img_Phash) and the plugin's directory name have to be the same?

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Perceptual image checking plugin

Postby sleeper_service » 20 Jul 2016, 03:21

aha! the directory name has to be af_zz_img_phash

mixed case didn't show up, but making the dir all lower case, (like other af_zz plugins) made it show up.

thanks!

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Perceptual image checking plugin

Postby fox » 20 Jul 2016, 09:10

oh right, i forgot about repo name being different from the directory name here

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Perceptual image checking plugin

Postby sleeper_service » 20 Jul 2016, 09:23

why for you sabbytage me???? :lol:

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Perceptual image checking plugin

Postby fox » 20 Jul 2016, 09:24

all part of the master plan

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Perceptual image filtering plugin

Postby fox » 20 Jul 2016, 17:35

trip report, this whole thing unfortunately scales like shit

e: updated version scales a lot better but needs a custom postgresql extension (linked in the op) and a schema reimport / update.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Perceptual image filtering plugin

Postby sleeper_service » 21 Jul 2016, 12:03

well, *that* was fun...

gcc -O2 -m64 -march=opteron-sse3 -mpopcnt -fpic -I/opt/postgres/9.5-pgdg/include/64/server -o count_bits.so -shared -fPIC count_bits.c

hope it doesn't blow up my postgres.

e sometime later: no boom so far.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Perceptual image filtering plugin

Postby sleeper_service » 21 Jul 2016, 13:58


User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Perceptual image filtering plugin

Postby fox » 21 Jul 2016, 21:36

I used default debian stuff i.e. gcc and postgres-dev and it's rock solid so far. 9.4 though.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Perceptual image filtering plugin

Postby sleeper_service » 22 Jul 2016, 03:48

Program terminated with signal 4, Illegal instruction.
#0 0xffff80ffbf1d1188 in unique_1bits ()
from /opt/postgres/9.5-pgdg/lib/64/count_bits.so

:(

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Perceptual image filtering plugin

Postby sleeper_service » 22 Jul 2016, 04:13

hokay, update, I recompiled the module, so it *didn't* use the popcntq instruction and now it's not coredumping postgres. fwiw:

gcc -O2 -m64 -march=opteron-sse3 -fpic -I/opt/postgres/9.5-pgdg/include/64/server -o count_bits.so -shared -fPIC count_bits.c

the previously mentioned select, which was hot death, now returns a hash.

ttrss=# SELECT article_guid FROM ttrss_plugin_img_phash_urls WHERE
[more] - > owner_uid = 2 AND
[more] - > created_at >= NOW() - INTERVAL '30 days' AND
[more] - > unique_1bits('113299711', phash) <= 5 ORDER BY created_at LIMIT 1;
article_guid
-----------------------------------------------
SHA1:584848d6f1443377f1bc62401454a6a6a0e02f30
(1 row)

so, yay!


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 2 guests