nagadomi / waifu2x

Image Super-Resolution for Anime-Style Art
http://waifu2x.udp.jp/
MIT License
27.56k stars 2.71k forks source link

Is it suitable for third party app to use online demo's api? #190

Open neoFelhz opened 7 years ago

neoFelhz commented 7 years ago

There's a Chinese Android APP using waifu2x online demo's API. And he adds some AD to his APP so that he can make money from it.

Here is the link of the APP: 图片放大镜-拯救马赛克 3.1 And there is the result of packets capture:

And there is the developer's reply to people's question about it:

Translations: Why a software should not have a little bit of profit? I do use someone else's server, and so what? Is it illegal? Why are some people always pretending to be the spokesperson of justice?

There're some information about the APP:

nagadomi commented 7 years ago

I know that some addons/scripts are using our API. waifu2x is an open source project, it can be easily clone it, so I think that they should host their own server. Also, our server is currently hosted by pixiv Inc. That is probably not what they intend. @edvakf

I am planning to use reCAPTCHA, but one concern is that Chinese users can not access reCAPTCHA because reCAPTCHA is hosted by Google. I've heard that. Is this true?

neoFelhz commented 7 years ago

@nagadomi Yes, it is true. I am from China, and I have to use proxy server to access the blocked sites. You can find out more details about GFW at wikipedia: https://en.wikipedia.org/wiki/Great_Firewall The reCAPTCHA can't work correctly because the GFW blocked nearly all the Servers of Google. But there are some captcha program which can be self-hosted. Maybe you can use them to avoid the abuse.

neoFelhz commented 7 years ago

On the other hand, most of abuse may come from China (I am sorry for that if it is true). Some Chinese like abuse free service, so waifu2x.udp.jp would avoid most of abuse if you decide to use reCAPTCHA.

wx40217 commented 7 years ago

What is worse is that he add ADs to his APP to earn money.He never thinks he is wrong and still laughes at people who says he copied others'work.

zunpiau commented 7 years ago

The developer will never stop his behavior unless you add some limit like reCAPTCHA.

aikachoco commented 7 years ago

@nagadomi I am another developer from china and I have something to say. In china , many people pack open source program into apps and add ads in it to earn money. AND WE DEVELOPERS HATE THEM. Now this app even advertises itself on other big sites and get more and more users which can cause huge server pressure , so please consider taking fireback such as reCaptcha quickly , really thanks.

btw I want to ask if it is legal to port this project to android platform and make an app for it(which all compute will be done using SOC not remotely)

nagadomi commented 7 years ago

@aikachoco waifu2x is licensed under MIT License. You can use this code for any commercial service. However, we are not allowed to use our web server directly. GPU instance is very costly.

neoFelhz commented 7 years ago

@nagadomi And all in all, we all think it is necessary for waifu2x.udp.jp using reCAPTCHA. It can avoid most of the abuse from China.

nagadomi commented 7 years ago

I am not thinking of blocking access from certain region. I just want to avoid high frequency continuous access and external use.

TigerBeanst commented 7 years ago

@nagadomi. So I think add reCAPTCHA is a way to avoid the thief like bzyapp

aikachoco commented 7 years ago

@nagadomi :thinking: so it means I could develop a version which uses chipset from the phone to compute and not use the server?(if I make the source code public too) Because I made it work on my MI5 before(of course with looooooow speed)

and for captcha... well after some negociation(i donot remember if the word spells like this), the developer seems not to take back his app....... Actually I and many other people here know how to bypass the GFW and do the reCAPTCHA xD and I think people who need the server also know how to do that so it actually doesnot block a specific country,it just blocks specific people with harmful intent therefore i still recommend using reCAPTCHA as quickly as possible to block too much heavy traffic by the app

appriciate for answering so quickly

nagadomi commented 7 years ago

@aikachoco

so it means I could develop a version which uses chipset from the phone to compute and not use the server?

Yes. Also, If you host the your own server, there is nothing wrong. And, android native app already exists at https://play.google.com/store/apps/details?id=com.kaede_software.superresolutionwaifu2x&hl=ja But it uses the old version of waifu2x model.

nagadomi commented 7 years ago

I've investigated the access log today. There are lots of external use, over 50% of POST request was external use. Currently some UserAgent is blocked, but I guess that they will use fake UserAgent. Probably we need some additional action.

neoFelhz commented 7 years ago

@nagadomi I strongly recommend using reCAPTCHA to avoid most of the abusement. Another idea is to limit the rate of frequency of the API request.

MarkussLugia commented 7 years ago

@nagadomi The developer updated his app about seven hrs ago. screenshot_20170728-184445 Which is again, capable of using the demo's API. screenshot_20170728-184429 With someone told him about the UA-blockage, I suppose the apps using fake UA, as you expected. So please do something. Quick.

nagadomi commented 7 years ago

hmm. now waifu2x.udp.jp have supported reCAPTCHA but I don't like reCAPTCHA, the quiz is very frustrating. also, currently we are using the google's server, it may not be accessible from china. I'm going to test the solution with reverse proxy.

MarkussLugia commented 7 years ago

reCAPTCHA is recommended. For the ones who really interests in how waifu2x works, accessing blocked sites is a piece of cake. It blocks most of the ones who just makes nonsense out of the demo. P. S. Google-hosted-third-party servers ARE ACCESSABLE in China. Thanks GFW, which blocks sites mainly by DNS corruption.

flaksp commented 7 years ago

waifu2x is an open source project, it can be easily clone it, so I think that they should host their own server

You are right, @nagadomi, but servers with GPU are too expensive. For small non-profit projects like mine (which made just 6-12 requests to waifu2x.udp.jp per day) it's impossible to pay $700/mo (lowest price I found on OVH) just for GPU which will be used only in one hobby project.

It will be awesome if you'll release some solutions for non-profit or small projects. Limited API, for example. Or at least any paid plans.

nagadomi commented 7 years ago

@ssimplix My position is the same as you. I am paying $600~$900/mo for free web service from my personal expenses. The number of GPU instance is chosen by the page view of my web service. There are no free resources. (currently the server is not hosted by pixiv.)

EDIT: The application that is descriped by OP is sending a lot of requests to my server. I am not interested in the business of rental API , so I decided to prohibit external use uniformly.

Mikoto10032 commented 7 years ago

I think that guy just like S.H.I.T.I hasn't official permission.

Incisakura commented 7 years ago

It seems that the app can't be found in Coolapk.I also hate this people very much. What a cheerful news.THANS ,OP And I found a lot of Coolapk Gays.

screenshot_20170731-131838

Signum1 commented 7 years ago

@nagadomi I thank you for waifu2x, a very useful tool. I just noticed the captcha and it is not a problem. Abuse of services can ruin it for all, so I'm glad you found a way to stop this without closing it down.

KatouMegumi-osu commented 7 years ago

Just saying! Captcha is an awesome addition! Now I don't have to wait 8 minutes to process one picture.

18701651336 commented 7 years ago

Just saying! Captcha is an awesome addition! Now I don't have to wait 8 minutes to process one picture.

NARKOZ commented 7 years ago

@nagadomi why not to introduce rate limiting instead of captcha?

You can allow only a certain number of requests per day from an IP, and I'm sure 10-20 requests per day will be sufficient for most users.

nagadomi commented 7 years ago

@nagadomi why not to introduce rate limiting instead of captcha?

It has already activated. 10req/min. Android app run on the client side, so it can not be regulated by IP rate limits. That app has lots of users.

KamillaPup commented 7 years ago

I have noticed processing is much faster! Thank you. I installed the code on my Mac, but it is so slow! Pixiv servers are much better.

hedw1gP commented 7 years ago

However, reCaptcha is not able to use in China Mainland, that means each time Chinese use waifu2x online demo, they have to use VPN in order to touch that I am not a robot, which makes painful

bibop87 commented 7 years ago

Hi guys, I understand why reCaptcha is needed, but can you make it so that it does not get complicated every time? Through the pictures 10 it starts to rage and offer to solve on 5 variants with road signs \ cars \ shop-windows, etc. For the text, sorry, google translate

oniyakun commented 7 years ago

I hate people who steal your API. I come from China and I think it's great for the verification code you mentioned, but I didn't see any verification code when I opened the website, and I can't use it. Is there any restriction on Chinese users?

hedw1gP commented 7 years ago

oniya123, it is GFW’s fault, not the waifu2x devs. China blocks Google, including Google’s reCaptcha, so it is unavailable in China unless you use a VPN or other proxy tools.

oniyakun commented 7 years ago

@ycwei982 I got it. Thank you very much!

nagadomi commented 7 years ago

OK, I will try to solve the problem that can not be accessed from China.

Incisakura commented 7 years ago

Oh,that's a bad news.If I want to use it normally,that would be impossible. So sad.

DestinoAzell commented 7 years ago

OMG re-Chapcha is annoying.. I have hundred of images to be get upscaled. yes I understand your reason but boy this is hard work. I really hope you could find a way to make it normal again p:s GTFO waifu2x you useless CHINA trashcan who only thinks about money(specifically this bastard). You're making my work alot harder now with that reCAPTCHA thingy. This is why we can't have nice things. It's because of these selfish people that exist in this world.Fucking A man.Sigh

hedw1gP commented 7 years ago

There's a replica of reCaptcha in China called Geetest, actually you can do a little modifying on Chinese Simplified Page, change reCaptcha to Geetest or something else

For free version it only accept 400 requests in an hour, annoying but no more plan

SerCom-KC commented 7 years ago

Replace https://www.google.com/recaptcha/api.js with https://www.recaptcha.net/recaptcha/api.js would solve the problem immediately.

nagadomi commented 7 years ago

www.recaptcha.net's code accesses www.google.com and gstatic.com. I think that is the same result as www.google.com's code.

I tried the reverse proxy approach like Nginx 反代 Google Analytics 和 reCaptcha 实践, but it needed over 10 answers to pass recaptcha. Google detected a fraud :disappointed:

nagadomi commented 7 years ago

Geetest

I could not solve Geetest's captcha so I could not sign up.

DestinoAzell commented 7 years ago

Oh God is there a way to avoid re-Captcha ToT I have to answer alot of questions just to upscale A PICTURE. and I still have a lot to do. 30mins job has turn to hours of job. It's not good for my heart man. It's just torture. BTW is there any web that is better or the same as waifu2x? I'm tired.

SerCom-KC commented 7 years ago

@nagadomi Use Chinese IP and that js would point to gstatic.cn & recaptcha.net instead of google.com (actually gstatic.com is also accessible in China now) so it shouldn't be a problem. Both domains have Chinese IP.

Here's an example of https://www.recaptcha.net/recaptcha/api.js

/* PLEASE DO NOT COPY AND PASTE THIS CODE. */(function() {if (!window['___grecaptcha_cfg']) { window['___grecaptcha_cfg'] = {}; };if (!window['___grecaptcha_cfg']['render']) { window['___grecaptcha_cfg']['render'] = 'onload'; };window['__recaptcha_api'] = 'https://www.recaptcha.net:443/recaptcha/';window['__google_recaptcha_client'] = true;var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://www.gstatic.cn/recaptcha/api2/r20170731114946/recaptcha__zh_cn.js'; var elem = document.querySelector('script[nonce]');var nonce = elem && (elem['nonce'] || elem.getAttribute('nonce'));if (nonce) { po.setAttribute('nonce', nonce); }var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();
Signum1 commented 7 years ago

@DestinoAzell There is a binary for Windows: https://github.com/lltcggie/waifu2x-caffe/releases/tag/1.1.8.2

Kugel-Blitz commented 7 years ago

I guess Geetest is kind of confusing for non-Chinese users... Maybe consider adding a subdomain like cn.waifu2x.udp.jp and link it to Geetest? I could help you signup.

Though in my opinion anyone who uses waifu2x for legitimate reasons in China would use a VPN in the first place... At least most tech geek does...

nagadomi commented 7 years ago

@SerCom-KC I've changed API URL. Thanks.

If waifu2x.udp.jp's reCAPTCHA is accessible from Mainland China please give me a report.

hedw1gP commented 7 years ago

Able to access.

fzq12345 commented 7 years ago

I am from China, is a middle school student, I think waifu2x is a very good tool he can help me deal with some of the usual I can not handle the photos so that the original need for an hour to complete the picture modification is shortened to a few minutes, Stick tool. But recently did not know how, the page seems to prohibit the Chinese ip login, which brought me a lot of trouble.

hedw1gP commented 7 years ago

fzq12345, go to demo page, is able to access reCaptcha service now?

luckydonald commented 7 years ago

How about adding a watermark if the recaptcha was not filled out (the apps don't know that field), so make them aware of the original website they are using?

fzq12345 commented 7 years ago

ycwei982 ,Can access, that is waifu2x download option did not respond.

Lakr233 commented 7 years ago

In fact, AI process require REALLY HIGH CPU and GPU performance that is expensive to build. The software website is a way to get it done easily via service computer that may include thousands video cards. Too much users may be a disaster to those computers. Also it is not support for you to make money.