GithubHelp home page GithubHelp logo

project-vave's Introduction

VAVE

VAVE는 기계의 현재 상태를 관리할 수 있는 웹 형태의 소프트웨어입니다. 진동 데이터를 넣어준다면, 다양한 종류의 상태 분류 모델을 확인 가능합니다.

VAVE 프로젝트

오늘날 새로운 기술과 지능화된 시스템의 등장으로 인해 기계 장치가 나날이 발전하고 있다. 반면 그에 따른 불확실성과 복잡성 역시 크게 증가하고 있는 추세이다. 이러한 복잡한 기계 설비 구조는 노후화된 설비룰 유지보수하기에 어려움을 주어 기계 작동에 영향을 미치게 된다. 여기서 기계 고장은 설비 정지, 유지 보수 비용 등의 악영향을 발생시켜 사고예지 및 보전 기술의 필요성이 대두되고 있다.

Pages

사용법

  1. 해당 레포지토리를 git clone한 후, web/vavefront 폴더에서 npm run start, web/vaveback 폴더에서 node index.js 명령어를 통해 실행한다.
  2. model/nodelback 폴더의 python main.py를 통해 FastApi를 구동한다.
  • 따로 서버용 데이터베이스가 구축되어있지 않아, 로컬 데이터베이스 연결 후 구동해주시기 바랍니다.

wiki page

vave에 대해 더 자세히 알고 싶다면, 다음 wiki page를 참고해주시길 바랍니다.

project-vave's People

Contributors

chaewon-leee avatar izongg0 avatar junseong2 avatar sohyun23 avatar

Watchers

 avatar

project-vave's Issues

웨이블릿 변환

description

  • 입력받은 진동데이터(.csv)를 시간,주파수 영역으로 변환
  • input : raw data (.csv)
  • output : ndarray

expected output

def convert_raw_to_wavelet(data: raw_data, wavelet_type: string): -> np.ndarray
   return wavelet_transformed_array

그래프 시각화 코드 작성

Description

  • PCA와 t-sne를 거쳐 시각화 그래프를 생성하는 함수
  • input : np.ndarray
  • output : graph.png / jpg file

expected output

def build_dimension_reduction_to_graph(data: np.ndarray, option: PCA or t-sne): -> np.ndarray
   return graph.png / ipg

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #4 #25

마이페이지 백앤드 연결

description

  • user테이블에서 userEmail의 정보를 불러와 Email에 넣어준다
  • user테이블에서 userName의 정보를 불러와 Name에 넣어준다
    (erd user Table참조)

제공되는 데이터

  • users.userEmail → “/api/mypage/user”
  • users.userName→ “/api/mypage/user”

expected output

Image

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #19

모델 영속화

description

pickle을 이용하여 python에서 구현한 모델을 파일로 저장한다.

input : python Class or function
output : pickle file ( .pickle )

expected output

모델을 구현한 Class 또는 function이 포함된 pickle 파일

pickle.dump(객체, 파일)
pickle.load(파일)

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #28 #26 #27 #9

모델 데이터 적용

Description

  • DB(nodejs)에서 보낸 파일을 모델 API 서버를 거친 결과 값을 DB(nodejs)로 전송
  • 모델에서 그래프 결과 값 / 모델 성능 결과 값을 전달

회원가입 페이지 백앤드 연결

description

회원가입 페이지에서 회원 정보를 입력하면 회원가입이 된다.

<회원가입>
입력하는 데이터 “/api/signup”

  • users.userEmail
  • users.userPassword
  • users.userName

expected output

회원 정보를 입력하면 users 테이블에 회원 정보가 저장 된다.
이미 사용하고 있는 이메일인지 확인할 수 있다.

Image

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #13

오토인코딩 이후 MLP 모델 구축

description

  • 오토인코딩으로 추출한 특징을 바탕으로 ANN모델구축
  • input : 오토인코딩 이후 특징,
  • output : model performance

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #7

메인페이지 기본구성 구현

description

  • 초기 파일첨부 비롯하여 메인페이지의 기본 구성 화면을 구현한다 (화면설계서 2-1 참고)

expected ouput

Image

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #10

Autoencoding

description

  • 푸리에변환을 거친 데이터를 3개의 레이어 중 2번째 레이어를 사용하여 특징 추출
  • input : 푸리에 변환 후 data(list)
  • output : 인코딩된 학습 데이터

expected output

encoding_dim = 32 

input_img = keras.Input(shape=(8,))
encoded = layers.Dense(encoding_dim, activation='relu')(input_img)
decoded = layers.Dense(8, activation='sigmoid')(encoded)
autoencoder = keras.Model(input_img, decoded)

encoder = keras.Model(input_img, encoded)

encoded_input = keras.Input(shape=(encoding_dim,))
decoder_layer = autoencoder.layers[-1]
decoder = keras.Model(encoded_input, decoder_layer(encoded_input))

autoencoder.compile(optimizer='adam', loss='binary_crossentropy')

autoencoder.fit(x_train_all, x_train_all,
                epochs=50,
                batch_size=256,
                shuffle=True,
                validation_data=(x_test, x_test))

encoded_x_train = encoder.predict(x_train_all)

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #3

메인페이지 Detail 구현

description

  • 파일을 첨부한 후의 메인페이지의 detail을 구현한다 (화면설계서 2-3 참고)

expected ouput

Image

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #15

데이터 개수 처리 코드 작성

Description

  • 데이터를 입력받아 1,250개의 행과 8개의 열인 총 8세트로 변환하는 코드 작성
  • input : 사용자가 첨부한 데이터
  • output : 데이터셋을 담고 있는 np.array 출력

expected output

range_list = list(range(0, 65, 8))
normal_dataset = []
abnormal_dataset = []
for idx in range(1, len(range_list)):
    start = range_list[idx-1]
    end = range_list[idx]
    normal_dataset_instances = fr_normal_dataset[start:end, :]
    abnormal_dataset_instances = fr_abnormal_dataset[start:end, :]

    normal_dataset.append(normal_dataset_instances)
    abnormal_dataset.append(abnormal_dataset_instances)

normal_dataset = np.concatenate(normal_dataset, axis=1)
abnormal_dataset = np.concatenate(abnormal_dataset, axis=1)

all_dataset = np.concatenate(
    [normal_dataset, abnormal_dataset], axis=1)

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 :

로그인, 로그아웃 기능 구현

description

  • 로그인
    • 입력한 이메일과 비밀번호가 일치하면 로그인이 된다.
  • 로그아웃
    • 로그아웃 버튼을 누르면 로그아웃이 된다.

<로그인>
입력하는 데이터 “/api/login”

  • users.userEmail
  • users. userPassword

expected output

Image

  • 로그인
    • 로그인에 성공하면 회원 정보를 담는 쿠키를 생성한다.
  • 로그아웃
    • 로그아웃 버튼을 누르면 저장되어 있던 쿠키를 삭제하면서 로그인페이지로 이동된다.

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #10, #24

모델 pickle 저장

description

  • fastapi에 사용하기 위해 모델을 pickle로 저장
  • input : 모델(푸리에변환&오토인코더, 푸리에변환&pca&tsne)
  • output : 피클화된 모델(.pkl)

expected output

joblib.dump(mlp, "../modelback/autoencoding.pkl")
load_model("pickle_model/auto_mlp.pkl")

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #3 , #4 , #25 , #7

파일첨부 백앤드 연결 구현

description

  • 파일을 첨부하게 되면 파일 이름이 저장된다.
  • 파일을 첨부한 user의 emil이 userEmail에 전달된다.
  • 파일 이름의 정보는 fileName에 전달된다
  • 파일의 첨부한 날짜의 정보는 fileDate에 전달된다
    (erd file Table 참조)

입력하는 데이터

  • file.fileName → “/api/uploadfile”
  • file.fileUrl → “/api/uploadfile”

제공되는 데이터

  • file.fileName → “/api/frame/filelist”
  • file.originalName → “/api/frame/filelist”

expected output

프론트에서 받은 파일을 백앤드에서 받고, 백앤드 폴더 안에 있는 파일 폴더에 저장한다.

Image

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #15

그래프 시각화 모듈 개발

Description

  • 사용자에게 입력받은 진동데이터 (csv 파일) 를 사용하여 푸리에변환을 거친 후, PCA와 t-sne를 통해 시각화 그래프를 생성하는 모듈
  • input : raw data (.csv)
  • output : graph.png / jpg file

expected output

python build_visualization_graph.py --csv_file vibration.csv --out_path ./graph

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #3 #4 #25 #31

메인페이지 백앤드 연결

description

  • 그룹의 정보를 objectgroup Table에서 불러온다
  • 그룹은 groupName을 보여주며 생성된 순서에 따라 내림차순으로 보여준다
  • 각 그룹의 해당하는 파일의 정보를 file Table에서 불러온다
  • 그룹에 해당된 파일은 fileName를 보여주며 생성된 순서에 따라 내림차순으로 보여준다
  • 선택된 파일의 결과를 result Table에서 불러온다
  • 결과는 모델 결과를 그래프 와 Accuracy, Precision, Recall, Specificity를 보여준다
    (erd 참조)

expected output

Image

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #15 #16

푸리에변환 코드 작성

description

  • 사용자에게 freq를 담은 list를 리턴
  • 사용자에게 푸리에로 데이터 변환된 결과값을 리턴
  1. raw_to_fourier
  • input : data (list)
  • output : fourier로 변환된 list
  1. fs_to_freq
  • input : 데이터 개수, sampling frequency
  • output : freq를 담는 list

expected output

def raw_to_fourier(data: list): -> list
   return signal

def fs_to_freq(n, fs): -> list
   return freq

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #74

메인페이지 백앤드 구현

description

  • 사용자에게 파일을 받아 메인 페이지에 보여준다
  • 그래프, 파일 목록, 기계명 등

<메인페이지>
제공되는 데이터

  • users.userEmail→“/api/main/user”
  • file.fileName→“/api/main/file”
  • model.modelId →"/api/frame/model”
  • model.modelName →"/api/frame/model”
  • result.resultId →"/api/frame/result”
  • result.failure →"/api/frame/result”
  • result.accuracy →"/api/frame/result”
  • result.precision → "/api/frame/result”
  • result.recall → "/api/frame/result”
  • result.specificity → "/api/frame/result”
  • graph.xvalue → “/api/main/graph”
  • graph.yvalue → “/api/main/graph”

expected output

Image

  • 사이드바에 있는 파일 이름을 클릭하면 메인페이지에 모델의 성능과 고장유무가 표시된다.

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #15 #16

프로필 편집 백앤드 연결

description

  • user테이블에서 userEmail의 정보를 불러와 Email에 넣어준다
  • user테이블에서 userName의 정보를 불러와 Name에 넣어준다
  • user테이블에서 userPassword의 정보를 불러와 PW에 넣어준다
  • 수정상황 발생시 해당하는 Entity에 수정된 상태로 바뀌어 저장된다

<마이페이지 편집>
입력하는 데이터

  • users.userName → “/api/mypage/edit”
  • users.userEmail → “/api/mypage/edit”
  • users.userPassword → “/api/editme/user”

expected output

Image

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #21

nodejs 백앤드 연결

description

devServer, proxy를 이용하여 vue와 node간에 연결한다.

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: ['vuetify'],
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:3000'
      }
    }
  }
})

expected output

vue와 node간의 통신이 가능하다.

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 :

로그인 백앤드 연결

description

로그인페이지에서 이메일과 비밀번호를 입력하면 로그인이 된다.

expected output

Image

입력받은 이메일과 비밀번호가 users 테이블에 저장되어있는 이메일과 비밀번호가 일치하면 로그인이 된다.
로그인에 성공하면 로그인 정보 쿠키가 생성된다.

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #10

T-sne 코드 작성

description

  • 사용자에게 입력받은 PCA를 거친 데이터를 T-sne 적용한 결과값 출력
  • input : data (pd.DataFrame)
  • output : t-sne를 거쳐 2차원으로 축소된 데이터프레임

expected output

viz_features = TSNE(n_components=2).fit_transform(pca_df.iloc[:, 0: 3])
viz_df = pd.DataFrame(data=viz_features, columns=['component1', 'component2'])
viz_df["label"] = pca_df["label"]

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #3

모델 API

description

  • API 서버에 모델을 추가한 후, 결과값 출력
  1. load_model
  • input : pickle화된 model
  • output : mlp model
  1. get_result_of_pca
  • input : 전처리를 마친 데이터셋
  • output : pca와 t-sne를 거친 데이터셋
  1. get_result_of_auto### expected output
  • input : 전처리를 마친 데이터셋
  • output : 오토인코딩을 거친 데이터셋

expected output

@app.post('/model')
def load_model(model_path): -> mlp model
    return loaded_model

def get_result_of_pca(all_df): -> pd.DataFrame
    return pca_y

def get_result_of_auto(all_df): -> pd.DataFrame
    return auto_y
async def create_item(data: Data): -> pca_result, auto_result를 거친 결과값, fourier_freq 결과값 출력
    return {"pca":pca_result, "auto":auto_result, "fourier_freq":fourier_freq_data}

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #58

웨이블릿 이후 CNN모델 구축

description

  • 웨이블릿 변환 출력값을 그래프로 나타내고, 그래프의 이미지를 학습시키기 위한 CNN모델 구축
  • input : image file (.jpg)
  • output : model performance

expected output

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #5

PCA 코드 작성

description

  • 푸리에변환을 거친 데이터를 입력받아 PCA 적용
  • input : data (list)
  • output : components를 3개 가지는 dataframe

expected output

pca = PCA(n_components=3) 
pca_features = pca.fit_transform(all_df.iloc[:, 0: 8])
pca_df = pd.DataFrame(data=pca_features, columns=[
    'component1', 'component2', 'component3'])
pca_df["label"] = all_df["label"]

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #3

arg로 값을 입력받는 코드 작성

Description

  • 사용자에게 첨부 받은 csv파일 데이터로 변환
  • input : 사용자가 첨부한 데이터
  • output : 리스트 형식으로 반환

expected output

warnings.simplefilter(
    action='ignore', category=FutureWarning) 

parser = argparse.ArgumentParser(
    description='raw data를 입력시 푸리에변환을 거친 PCA와 t-sne 결과를 보여주는 모듈')
parser.add_argument('raw_data_path', help='raw data path(.csv)')
parser.add_argument('fs', help='sampling frequency (hz unit)')

args = parser.parse_args()
all_dataset = np.loadtxt(args.raw_data_path, delimiter=',')

expected issues

  • 본 이슈는 다음 이슈들과 종속성이 없음

MLP모델 구축

description

  • 특징추출(pca+tsne/Autoencoder)을 거친 데이터를 바탕으로 MLP모델 구축
  • input : 특징추출 이후 data
  • output : model performance
mlp = MLPClassifier(hidden_layer_sizes=(10, 128, 256,), activation='logistic',
                    solver='sgd', alpha=0.01, batch_size=32,
                    learning_rate_init=0.1, max_iter=500)

mlp.fit(x_train_scaled, y_train_all)
mlp.score(x_test_scaled, y_test)

expected issues

  • 본 이슈는 다음 이슈들에 종속성이 있음 : #4 , #25 , #7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.