1. Introduction
One of the main issues regarding applicable deep learning research is the availability of the models, case studies, and research in an easy and accessible way to other researchers [
1]. While reproducing results has been possible, albeit both time and resource-intensive, for experts in the field, it remains a problem for non-technical people, researchers, and students who are new to this domain to see how well a deep learning model performs over their own inputs. This is mostly due to either computational limitations or allocating the time needed for setting up and testing many models they might consider for their research. Many studies [
2,
3] have made additional efforts to support scientific communication and reproducibility by providing a working example of their study in a web-friendly format that, more often than not, accepts inputs from users and returns an output. Such applications typically carry some popular science and outreach value. Another approach used by deep learning researchers to communicate their findings to the public is to provide their code and trained deep learning models via platforms, such as GitHub, and various deep learning model repositories, often called model zoos (i.e., ONNX Model Zoo [
4], Nvidia’s NGC Catalog [
5]).
While most studies adopt the latter method to enable other people to try their research, this tendency has a logistically sound reason. Even though it is vital for the public to be able to see how the findings of some research are realized in real-world settings, it is also difficult to provide an end product that employs the presented research for third parties to use. Providing proof of concept for research is the backbone for any study to be useful and accessible to others. It is also resource-consuming for researchers to transform that proof of concept into a working application for real-world use cases most of the time. The resource-wise needs for an application typically comprise many aspects, from labor to computational power. From a researcher’s perspective, it is more sensible to utilize those resources in further research instead of allocating them for real-world applications just for publicity. One could argue that computational power needs could be surpassed by simply implementing a web application that utilizes the client side’s computational power. This would be a reasonable approach in order to get past the problem of devoting costly computational capabilities, but it also adds to the need for labor since, typically, a deep learning model is developed in an experimental setting in server-side programming languages such as Python. Consequently, researchers typically prefer to release the code that could be used to reproduce the results, sometimes alongside a pre-trained model. This, in theory, is an attempt to communicate the study’s findings, but by its nature, it only communicates with other researchers who are willing to put the necessary time in to advance the science, rather than supporting non-technical people who might be interested in, and beyond that, could benefit from, the conducted research.
Most of the time, these studies share their model codes on platforms such as GitHub, linking their pre-trained models stored in the cloud. Beyond that, there are many “model zoos” from which many pre-trained state-of-the-art models for common tasks can be acquired. These zoos occasionally include the code and sometimes give out instructions to show how to utilize the given model. While there are examples of model zoos that are framework-blind, in other words, model zoos that do not have specific framework requirements, such as modelzoo.co [
6], most numeric computing libraries also have their own zoos in their repositories, such as TensorFlow [
7] and Open Neural Network Exchange [
4]. While these zoos are community-driven efforts, there are some model zoos that list ready-to-use deep learning models in specific commercial AI devices, such as Texas Instruments’ TI Edge AI Cloud [
8] and Hailo.ai’s Model Zoo [
9]. Besides all these examples, Nvidia’s NGC Catalog [
5] also provides many state-of-the-art models with instructions on how to run them on containers.
Besides the aforementioned model zoos, a rare minority of studies in the literature choose to provide a working application, most of the time in the form of a web application. This has been mainly for generative works, as these models typically expect minimal input from the user. Thus, they are easier to conceptualize on the web, though, most of the time, not by the original authors. Such examples are primarily in the “this thing does not exist” format. They typically show a completely new output generated by the proposed network at each reload of the web application. The list of studies employing this approach includes, but is not limited to, face generation [
3,
10], vase image generation [
11], resume generation [
12], and artwork generation [
13]. Beyond these, some of the ONNX models from the ONNX zoo that are presented on the ONNX.js [
14] demo website, such as emotion detection [
15] and object detection [
16], also apply.
There are also other practical applications of deep learning models available on the web, such as Quick Draw by Google, which predicts what a user is drawing [
17], and pix2pix [
2], which converts your drawing to a photo [
18]. Online deployments of language models such as GPT-3 [
19] can also be mentioned as examples of deep learning models running on browsers. It should be noted that, even though some of the studies mentioned here use server-side resources, they typically utilize client-side resources. One commonality among these models is that they depend on individual efforts to communicate their findings. Aside from the ONNX.js showcase, which is only for demonstrative purposes, they do not share a common platform or methodology to include non-technical people in AI research or other domains.
In order to understand how deep learning models could be run on the web, specifically on the client side, it is of utmost importance to discuss how client-side computing is performed. Conventionally, computing on the web has primarily been for citizen science purposes. From extraterrestrial research [
20] to hydroscience [
21], there are many studies in the literature that take advantage of the client-side resources of volunteers to advance science, some of which are on browsers. With deep learning being a part of many applicable studies, ways to utilize computing on browsers have been explored for deep neural networks as well. The literature on client-side tensor computing libraries, in other words, deep learning frameworks that work on browsers, is abundant. ONNX.js, Keras.js [
22], and TensorFlow.js [
23] are popular libraries used in many studies.
Open Neural Network Exchange, or ONNX, is a library that aims to be middleware between many tensor computing libraries, such as TensorFlow, PyTorch [
24], and MXNet [
25]. ONNX provides programmable interfaces to convert models between popular tensor computing libraries. Even though ONNX has its own runtime as a Python package to run converted models, one can also convert an ONNX model to another framework’s model format. Beyond Python, the ONNX ecosystem provides a package to run ONNX models on browsers called ONNX.js. ONNX.js, though with limitations in terms of implemented architectures, provides a medium to run ONNX models in browsers. For performance purposes, the ONNX.js runtime supports web technologies such as WebAssembly and WebGL. One drawback that ONNX and inherently ONNX.js carry is that one cannot train a model with them. Considering that they do not aim to provide training functionality in the first place, this is an arguable drawback. It should be noted that ONNX.js was replaced by ONNX Runtime Web [
26], which also works in JavaScript. Since it is still in active development, it does not provide a viable framework to build a generalized deep learning platform with.
One popular deep learning package for JavaScript and browsers is Keras.js. Using the boilerplate of a popular deep learning package, Keras [
27], Keras.js provides an easy-to-use framework to train and run deep learning models. While it was one of the go-to solutions to deploy some deep learning models on the web when it was first released, it is not actively maintained as of now in favor of TensorFlow.js. TensorFlow.js uses the TensorFlow library, which is backed by Google. Now that Keras models and TensorFlow models are somewhat intertwined, TensorFlow.js supports both Keras and TensorFlow models, which covers a great majority of deep learning models, but not as much of the applicable research. Beyond this, TensorFlow.js has the large functionality of Keras and TensorFlow in terms of available architectures and matrix operations. This makes TensorFlow.js the most popular deep learning framework for online applications. Similar to ONNX.js, TensorFlow.js also supports WebAssembly and WebGL for faster training and execution.
Furthermore, there are a few other deep learning frameworks that run on JavaScript and subsequently could be used on web browsers, such as WebDNN [
28], ConvNet.js [
29], and brain.js [
30], but they do not focus on community support and practicality like TensorFlow.js. One exception might be ml5.js [
31], which runs on TensorFlow.js and aims to provide an abstraction layer to make running models on the web more accessible, thus differentiating itself from others in terms of audience and value. There are vast quantities of deep learning application papers published every day. Most of the time, the research is not easily reproducible. Even when the code or pre-trained models are provided, since all deep learning frameworks need some level of expertise to run a model, people with no AI modeling experience will not be able to run and see the results of a study for themselves.
Deep learning has been a methodology of interest for many earth science studies. Whether it be about social media streams, such as Twitter data, that is related to natural disasters [
32], or digital elevation models [
33], there are many studies in earth science that utilize deep learning methods. Modeling floods for prediction [
34,
35] and rainfall to increase temporal interpolation [
36] are among the deep learning application studies in the field, along with benchmark dataset efforts [
37] to support the literature [
38,
39]. Even though deep learning application studies are somewhat in abundance in the literature of earth and climate sciences, there are still challenges in the scientific communication of studies utilizing deep learning. To the best of our knowledge, there are no studies that have shared their developed and trained deep learning models for earth and climate sciences problems on the web for third parties to experience. Beyond already published studies, similar to any data-driven methodology, adopting deep learning in their applications is appealing to domain scientists, i.e., scientists who are experts in earth and climate sciences, but might not have the technical expertise to apply deep learning in their field. In order for them to start exploring how deep learning could be utilized in their fields, understanding the literature beyond what the scientific literature presents is of the utmost importance to capitalize on the deep-learning-based modelling potential in the field.
This study aims to empower scientists studying in the domains of earth and climate sciences to reproduce and test previously trained deep learning models easily with their data and settings without having to train or even know how to use a specific tensor computation library used in selected projects. We present EarthAIHub, an easy-to-use web application utilizing client-side resources to run deep learning applications. EarthAIHub comes with a configuration middleware between individual models and TensorFlow.js to facilitate the easy adoption of the system among deep learning practitioners. The configuration structure detailed in this manuscript enables deep learning researchers to communicate their research while allowing domain scientists to experience deep learning models in Earth sciences easily. The platform is designed to accommodate many different input/output types that a neural network model in Earth sciences could potentially operate over, such as comma-separated values (CSV) files, NumPy [
40] files (npy), and various image formats, to facilitate ease of use within the Earth sciences field. Furthermore, in order to demonstrate that EarthAIHub is able to run models using those input and output types, we present several model and use cases. EarthAIHub is designed with a community-centered approach and easy-to-use model configuration templates to deploy models to the platform for others to test and experience for the long-term sustainability of the user base.
The rest of this paper is structured as follows; in the next section, we detail the implementation of the web application to explain how deep learning models specified for different tasks could run on the same platform. Then, in
Section 3, we present selected deep learning models in environmental science and show how configurations could be built for them and run on EarthAIHub. In
Section 4, we share the findings of using EarthAIHub for the presented use cases along with future directions. Finally, in
Section 4, we summarize the study and share final remarks.
4. Discussion
As we briefly discussed in the Introduction section, a common approach to making deep learning accessible is to share trained models through deep learning model repositories, or preparing a typically web-based dedicated platform that allows others to experiment with the model. For the first option, Earth scientists would need technical expertise to train or run specific tensor computing libraries in order to test the shared deep learning model, while the second option brings a burden for deep learning practitioners as they would need to allocate substantially more time and resources to make their research publicly available and accessible to ensure scientific communication. On the contrary, in the previous section, using EarthAIHub, we have shown that with the use of their own data, domain experts from the earth and climate sciences will be able to quickly recreate and test previously trained deep learning models without having to learn how to use a specialized tensor computation library that is utilized in some Earth sciences studies as interface figures suggest that EarthAIHub is a user-friendly web application; thanks to the design choices, it takes advantage of client-side resources to run deep learning models. Furthermore, the configuration middleware between individual models and TensorFlow.js that is included with EarthAIHub makes it hassle-free for deep learning practitioners to utilize the system. The previous section proves that using the configuration for ease of usage in the earth sciences, the platform is made to support a wide range of input/output types that a neural network model may possibly operate over, including comma-separated values (CSV) files, NumPy files (npy), and numerous picture formats.
As of now, EarthAIHub is designed to run only TensorFlow.js models. It is not always possible to convert a model that has been trained in one programming language and framework pair to TensorFlow and later TensorFlow.js. For instance, in order to convert a PyTorch model to a TensorFlow.js model, one needs to convert that model to ONNX, TensorFlow, and finally TensorFlow.js consecutively. Moreover, some implementations of some architectures are not always available in all of these libraries. For instance, some recurrent neural network structures in PyTorch are implemented differently than they are in TensorFlow. Consequently, one could easily encounter problems when converting that model to TensorFlow.js. The coverage of models and architectures could be extended by incorporating other numeric computing and deep learning libraries in JavaScript, such as ONNX Runtime Web. One downside of not implementing ONNX Runtime Web into EarthAIHub during this study was, as mentioned earlier, that ONNX Runtime Web has still not been fully developed for practical web applications.