Image Labeling Tool APP Design & Development Dairy

本文介绍了如何使用Flask和PostgreSQL在Ubuntu上构建一个应用,实现后台数据库中图片的显示、全尺寸查看、切换以及前端使用Ionic和Angular进行上传和标签操作。涵盖了虚拟机设置、数据库管理、Flask API设计及前端组件的实践应用。
摘要由CSDN通过智能技术生成

1. Introduction

An App be able to:

  • Show images from backend database
  • Show image in full size
  • Switch for next/previous image by buttons
  • Upload image
  • Tag image and save changes to database

2. Main Structure

在这里插入图片描述

3. Backend

Flask + PostgreSQL running on Ubuntu.

3.1 Backend Structure:

  • backend
    • gallery (images are saved in this folder)
    • venv (virtual environment)
    • api.py

3.2 VirtualBox Set up

3.3 Set up PostgreSQL database on Ubuntu

3.4 Flask

3.5 Set up Tomcat to read image by path on Windows

4. Frontend

Ionic + Angular running on Windows.

4.1 Structure

  • app
    • pages
      • gallery
      • gallery-detail
      • upload-img
    • services
      • gallery.service
      • img.model.ts

4.2 Basic Ionic + Angular

  • Practise: First App
  • Ionic tutorial
  • Typescript tutorial
    • https://www.youtube.com/watch?v=WBPrJSw7yQA
    • https://www.runoob.com/typescript/ts-tutorial.html
    • https://zhuanlan.zhihu.com/p/63346965
    • https://zhuanlan.zhihu.com/p/39246495

4.3 HTTPClient Module Usage

Use HttpClient Module of Ionic to send http request

4.4 Echarts Usage

import { Component, OnInit } from '@angular/core';
import * as echarts from 'echarts';
import 'echarts-liquidfill';

@Component({
  selector: 'app-recipes-loading',
  templateUrl: './recipes-loading.page.html',
  styleUrls: ['./recipes-loading.page.scss'],
})
export class RecipesLoadingPage implements OnInit {

  constructor() { }

  ngOnInit() {
  }

  ionViewDidEnter() {
    const ec = echarts as any;
    const container = document.getElementById('chart');
    const chart = ec.init(container);
    const svgPath = 'path://M725.536321 1024H298.88352a127.99584 127.99584 0 0 1-127.99584-127.99584v-388.254049A213.3264 213.3264 0 0 1 213.55296 85.363839a216.31297 216.31297 0 0 1 109.223117 29.865696 213.3264 213.3264 0 0 1 378.867687 0A216.31297 216.31297 0 0 1 810.866881 85.363839a213.3264 213.3264 0 0 1 42.66528 422.386272V896.00416a127.99584 127.99584 0 0 1-127.99584 127.99584zM256.21824 810.6736v85.33056a42.66528 42.66528 0 0 0 42.66528 42.66528h426.652801a42.66528 42.66528 0 0 0 42.66528-42.66528v-85.33056z m406.600119-85.33056H768.201601v-255.991681a42.66528 42.66528 0 0 1 42.66528-42.66528 127.99584 127.99584 0 1 0-97.276839-211.193136 42.66528 42.66528 0 0 1-73.384281-21.33264 127.99584 127.99584 0 0 0-255.991681 0 42.66528 42.66528 0 0 1-74.66424 21.33264A127.99584 127.99584 0 1 0 213.55296 426.686079a42.66528 42.66528 0 0 1 42.66528 42.66528v255.991681h109.64977v-127.99584a42.66528 42.66528 0 0 1 85.33056 0v127.99584h127.99584v-170.66112a42.66528 42.66528 0 0 1 85.33056 0z';

    chart.setOption({
      series: {
        type: 'liquidFill',
        data: [1, 0.9, 0.8, 0.7, 0.6],
        shape: svgPath,
        outline: {
          show: false
        },
        radius: 193.175,
        label: {
          normal: {
            show: false,
            formatter: ''
          }
        }
      }
    });
  }
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值