Synthesis Image Noise Detection on Distributed Data : A web app to collect data on noise detection by humans on images. https://diran.univ-littoral.fr/doc
Jérôme BUISINE a4e30336b3 Merge branch 'release/v0.5.0' | 4 jaren geleden | |
---|---|---|
DOCUMENTATION | 5 jaren geleden | |
public | 5 jaren geleden | |
server | 5 jaren geleden | |
src | 4 jaren geleden | |
test | 4 jaren geleden | |
utils | 4 jaren geleden | |
.dockerignore | 5 jaren geleden | |
.editorconfig | 5 jaren geleden | |
.eslintrc.js | 5 jaren geleden | |
.gitignore | 5 jaren geleden | |
LICENSE | 5 jaren geleden | |
README.md | 5 jaren geleden | |
babel.config.js | 5 jaren geleden | |
back.Dockerfile | 5 jaren geleden | |
cleanExtracts.js | 5 jaren geleden | |
config.js | 5 jaren geleden | |
config.messagesId.js | 5 jaren geleden | |
docker-compose.frontapp_only.yml | 5 jaren geleden | |
docker-compose.yml | 5 jaren geleden | |
experimentConfig.default.js | 5 jaren geleden | |
front.Dockerfile | 5 jaren geleden | |
generateExtracts.js | 5 jaren geleden | |
index.js | 5 jaren geleden | |
jsconfig.json | 5 jaren geleden | |
package.json | 4 jaren geleden | |
webhook_deploy_gogs.js | 5 jaren geleden | |
yarn.lock | 4 jaren geleden |
Synthesis Image Noise Detection on Distributed Data (SIN3D)
A web app to collect data on noise detection by humans on images.
git clone https://gogs.univ-littoral.fr/Prise3D/SIN3D.git
cd SIN3D
See https://diran.univ-littoral.fr
See /DOCUMENTATION
See https://diran.univ-littoral.fr/doc
You can use the SIN3D-data-extract library to easily extract data from this application database.
Use the following environment variables to configure the application.
Option | Default value | Description | Server | Client |
---|---|---|---|---|
PORT |
5000 |
The port used by the started application | ✅ | ✅ |
SERVE_CLIENT |
true |
Should the server serve client (Fully local application) | ✅ | ⬜️ |
IMAGES_PATH |
./images |
The directory where the images are stored (absolute path if changed ⚠️) | ✅ | ⬜️ |
MONGO_URI |
mongodb://localhost/sin3d |
MongoDB database connection URI | ✅ | ⬜️ |
Configure more deeply the way the app works by modifying config.js.
Option | Default value | Description |
---|---|---|
apiPrefix |
/api |
The url prefix for the API |
imageServedUrl |
/api/images |
The url prefix from where the images are served |
serverPort |
5000 |
The port used by the server |
mongoDatabaseURI |
mongodb://localhost/sin3d |
MongoDB database connection URI |
imagesPath |
./images |
The directory where the images are stored |
serveClient |
true |
Should the server serve client files from the /dist directory |
fileNameConvention |
/^(.*)?_([0-9]{2,})\.(.*)$/ |
File name convention for images |
extractsDirName |
extracts |
Name of the directory containing extracts |
sceneFileNameBlackList |
['config', 'seuilExpe', 'extracts'] |
Files to ignore in scenes |
deleteExtractsCronTime |
0 3 * * * (every day at 03:00 AM) |
Cron time for extracts deletion |
logger |
Logs : logs/server.combined.log Errors : logs/server.error.log |
Default application logger |
dbLogger |
Logs : logs/db.log Errors : logs/db.error.log |
Database logger configuration |
Linux
PORT=8080 SERVE_CLIENT=true IMAGE_PATH=/var/images docker-compose up
Windows
SET PORT=8080
SET SERVE_CLIENT=true
SET IMAGE_PATH=C:\my\images
docker-compose up
Linux
SERVE_CLIENT=false docker-compose up
Windows
SET SERVE_CLIENT=false
docker-compose up
docker-compose -f docker-compose.frontapp_only.yml up
When using a new version of the project, you need to re-build the application with Docker.
# Server / Server + client versions
docker-compose build
# Client only version
docker-compose -f docker-compose.frontapp_only.yml build
As of now, Windows hosts are not supported due to MongoDB volumes not being mappable to this system.
Install project's dependencies.
yarn install
If this is a production build, set the NODE_ENV
environment variable to production
to enhance performance.
Linux
export NODE_ENV=production
Windows
SET NODE_ENV=production
yarn run server:start
If you specifically want to not start the extracts remover service (extracts are automatically deleted everyday), use the following.
server:start:no-delete-extracts
yarn run server:lint
To use the client, you need to initialize experiment configurations first.
cp -r experimentConfig.default experimentConfig
You can modify the configuration for each mixins, experiments or scene by modifying files in the newly created ./experimentConfig
directory.
Files will be built to the dist/
directory.
yarn run app:build
yarn run app:dev
yarn run app:lint
The app can be automatically deployed when a push event is sent to the master branch using Gogs. Open a port to the web and start webhook_deploy_gogs.js.
WEBHOOK_SECRET=your_webhook_secret WEBHOOK_PORT=5000 SERVE_CLIENT=true PORT=8080 node webhook_deploy_gogs.js
You can pass any parameters to the script, they will be passed to the Docker instance. The following are required.
Option | Description |
---|---|
WEBHOOK_SECRET |
The secret set on Gogs to verify the identity |
WEBHOOK_PORT |
The port the script is listening to |
The docker-compose
script will automatically run tests. Use the following command to run them by hand.
yarn test
The docker-compose
script will automatically build the API documentation. Use the following command to build it by hand.
yarn doc
The documentation is generated to the doc/
directory. If you started the server, the documentation is served at /doc/
.
During application use a lot of data is collected by platform, here a description of main message identifier used: