LabelLab is an image analyzing and classification platform. It allows users to upload batches of images and classify them with labels. It also has the features to run classifications against a trained model. LabelLab also has a user project management component as well as an image analyzing component.
See the LICENSE file for details.
Host your own Labellab server for FREE with One-Click Deploy
Clone the repository.
git clone https://github.com/scorelab/Labellab.git
Run npm install
in labellab-client
folder.
cd labellab-client/
npm install
Run npm install
in labellab-server
folder.
cd labellab-server/
npm install
First you need to create a .env
file in both labellab-server
folder and labellab-client
folder following the template provided in the file .env.example
which is present in both the folders.
For client-side .env
file:
REACT_APP_HOST=localhost
REACT_APP_SERVER_ENVIRONMENT=dev
REACT_APP_SERVER_PORT=4000
For server-side .env
file:
HOST=localhost
PORT=4000
JWT_SECRET
can be any word your choice.
To create a free MongoDB Atlas cloud database, follow the guide at https://docs.atlas.mongodb.com/getting-started/. After setting up, find the conection string to your database. It should look like this:
{{DB_HOST}}:https://{{DB_USERNAME}}:{{DB_PASSWORD}}@{{DB_CLUSTER}}/{{DB_NAME}}
You should fill in these values in their relevent fields in the .env
file.
NOTE: Your IP address may change if you've been disconnected from the internet and reconnected. If that happens, it means that your internet connection doesn't have a static IP. You may no longer be able to access the database if you've whitelisted only your previous IP address. You can allow access from any IP address from the Atlas control panel to overcome this issue.
Both the front-end and the back-end can be run from the labellab-server
folder using the terminal:
-
To run both the client and server with a single command, run the following:
$ npm run dev
-
To run the server separately:
$ npm run server
The server can also be run using
$ npm start
- To run the client separately:
$ npm run client
NOTE: Before starting the server create a file named
.env
same as.env.example
and add your OAUTH and DATABASE credentials in the file.
Visit localhost:3000 to browse.
NOTE: This version only supports Google Chrome and Mozilla Firefox browsers. Make sure to instal the extension Redux Dev Tools if you're using Google Chrome.
Run the Node server in the labellab-server
directory (if not already done):
npm start
In a new terminal navigate to labellab_mobile
directory.
Configure the lib/config.dart
using the format provided in lib/config_example.dart
.
The application needs google-services.json
file issued from Firebase to operate Google Sign in option. To obtain this file,
- Sign in to https://console.firebase.google.com/.
- Click Add Project and necessary information about the project.
- Agree to the terms and click Create Project.
- After creating the project, click Add Firebase to your android app.
- Go to project location and open
android/app/src/main/AndroidManifest.xml
. Copy the package name(org.scorelab.labellab_mobile) and paste in the package name field - Get the SHA1 fingerprint by following the instructions ( https://developers.google.com/android/guides/client-auth ) and paste it in the SHA1 fingerprint field.
- Click next and download the
google-services.json
. - Paste the file in location
android/app/
folder.
Build the Flutter application,
flutter build apk
NOTE: Use 'ios' instead of 'apk' to build for iOS.
or run the Flutter application.
flutter run
NOTE: A device with USB debugging enabled or virtual device is required.
- Python3 - Make sure you have a python3 environment setup.
- Virtualenv - Make sure you install your packages locally in a virtual env and after adding a packing make sure to use
pip freeze>requirements.txt
- MySQL - Preferrably MySQL-5.7 database is used.
- SQLAlchemy - An SQL ORM
-
Make a database in your MYSQL
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] labellab
-
Create a virtual env in that folder using
pip install virtualenv or sudo -H pip install virtualenv virtualenv -p python3 venv
-
Change directory to the folder.
cd venv/ source bin/activate for MacOs or linux .\Source\activate.bat for Windows
-
Change the directory back to the parent directory and
add the credentials to your database in the.env
file. -
Install all the dependencies using
pip install -r requirements.txt
-
Upgrade your database using the migrations file
flask db upgrade
-
Run
flask run
in order to start the server.
Note: It is preferred to undo the migrations before pulling the latest changes, if the latest changes have any changes in the migrations
or has a new migrations file and in order to create a new migartions file the commandflask db migrate
can be used.
Note: If faced by a directory missing issue do ensure that you have the labellab-flask directory in your
PYTHONPATH
environment variable.
Note: For documentation on the Labeller Go to:Labeller Documentation