V7Labs 提供的 Chrome Extension,偵測圖片是否為人工智慧生成的

寫完上一篇「可以看 Chrome Extension 程式碼的 Chrome extension source viewer」後就可以來提「Fake Profile Detector tells you if people are real or fake online」這個了,文章裡面在介紹 V7Labs 所提供的 Chrome Extension:「Fake Profile Detector (Deepfake, GAN)」。

從套件的名字可以看出來他主要是偵測 GAN (Generative adversarial network) 類的類神經網路,這點在套件裡面說明也可以看到:

Right-click on a profile picture, our model will detect if that image contains a GAN generated or real person!

實際上測試時要注意要儘量抓夠大的圖片丟進去測,像是 Generative adversarial network 維基百科這頁裡面「Concerns about malicious applications」這個章節右邊兩張 GAN 生成的圖,如果你用維基百科預設的縮圖大小 (220x220),上面這張會猜測是真人,下面那張會猜測是假人。

但如果到大一點的圖 (600x600) 的話就都會猜測是假人:「File:Woman 1.jpg」、「File:GAN deepfake white girl.jpg」,原圖 1024x1024 的話也可以偵測出來。

然後 source code 就在那邊可以看 API 怎麼打,大家可以自己研究...

機器學習與情色產業的問題

Bruce Schneier 提到了最近幾個剛好相關的議題,關於機器學習在情色產業使用時遇到的隱私議題:「Technology to Out Sex Workers」。

第一個提到的是 PornHub 用機器學習辨識演員以及各種「其他資訊」,這邊引用的報導是 TechCrunch 的「PornHub uses computer vision to ID actors, acts in its videos」:

PornHub is using machine learning algorithms to identify actors in different videos, so as to better index them.

The computer vision system can identify specific actors in scenes and even identifies various positions and… attributes.

第二個提到的是花名與真實身份連在一起的問題:

People are worried that it can really identify them, by linking their stage names to their real names.

最後是提到 Facebook 已經有能力這樣做,而且已經發生了:

Facebook somehow managed to link a sex worker's clients under her fake name to her real profile.

Her sex-work identity is not on the social network at all; for it, she uses a different email address, a different phone number, and a different name. Yet earlier this year, looking at Facebook’s “People You May Know” recommendations, Leila (a name I’m using using in place of either of the names she uses) was shocked to see some of her regular sex-work clients.

這個議題與 Mass surveillance 有點像...。

用 SAWS 管理 AWS 資源

看開發記錄,應該很久了... 這次是 donnemartin/saws

Python 寫的,所以用 pip 就可以跑,不過目前還是不支援 profile:

Command line options for starting SAWS with a specific profile are under development.

所以自己用還可以 (因為只有一個帳號),公司有一堆帳號得切來切去就沒辦法了,先丟著...

EC2 的 IAM Role 可以動態改了...

EC2IAM Role 根本是開發階段最常重新啟動的理由之一 XDDD

AWS 總算把動態調整 IAM Role 的功能給做出來了:「New! Attach an AWS IAM Role to an Existing Amazon EC2 Instance by Using the AWS CLI」。

不過看到文章完全沒有截圖,心裡大概就猜得到目前 web console 還不支援了... 現在只能透過 command line 操作,像是「Attach the IAM role to an existing EC2 instance that was originally launched without an IAM role」這一段:

$ aws ec2 associate-iam-instance-profile --instance-id YourInstanceId --iam-instance-profile Name=YourNewRole-Instance-Profile

或是「Replace the attached IAM role」這段:

$ aws ec2 replace-iam-instance-profile-association --association-id YourCurrentAssociation-id --iam-instance-profile Name=YourReplacementRole-Instance-Profile

不過有進度總是比沒進度開心,這功能應該會加到 web console...

GitHub 提供新的 contribution (小綠點) 計算方式

以往 GitHub 在個人頁面上的 contribution 只會計算 public repository,現在則可以設定將 private repository 也統計進去:「More contributions on your profile」。

private repository 的部份只會顯示數量,不會公開任何細節,像是我用 incognito mode (無痕模式) 可以看到在沒有登入時的資訊:

但如果是登入後就會有詳細資料:

Stack Overflow 做的 Developer Survey 2016

Stack Overflow 對開發者發問卷後把結果整理出來了:「Stack Overflow Developer Survey 2016 Results」,約 56k 個樣本數:

This year, 56,033 coders in 173 countries answered the call.

整個問卷分成五塊區域:Overview、Developer Profile、Technology、Work、Community,其中 Overview 的部份是給時間不多的人看的,整理了一些比較特別或是有趣的重點:

Most developers prefer dogs to cats. (But not developers in Germany.)

(唔?)

要注意的是,問卷只有英文版本,所以這份問卷明顯對於英文非母語的開發者會有比較低的填寫意願,會造成統計偏差問題,所以在讀之前要注意到:

Surveys aren’t perfect. While our large sample size helps offset some biases, it’s still biased against devs who don't speak English, or who don't like taking English-language surveys.

另外是有女性對這份問卷表示不滿:「Stack Overflow’s developer survey analysis hurts women」,尤其是 Stack Overflow 標示了只有 5.8% 的女性,這會導致女性樣本數在答案細分族群時的統計偏差的問題會很嚴重。

另外這篇文章的作者也對 Stack Overflow 裡的結論很不滿意。

回到原來文章,有些東西還蠻有趣的:

其中 Salary 這段應該是很多人都有動力去讀一讀了解的,裡面還包括了各地區與麥當勞的大麥克指數的相對數值分析,讓你有個參考值可以感覺。

把 Google Chrome 右上角的帳號管理功能拿掉 (Profile Management)

hSATAC 推薦的用法是:

不過我還是不喜歡啊... 關法是到「chrome://flags/#enable-new-profile-management」這邊關掉,需要重新打開 Google Chrome