728x90
전체 글
544

[Flutter] push a new page for a specific duration (use mounted)

//push Navigator.of(context).push( MaterialPageRoute( builder: (context) { return Scaffold( backgroundColor: Theme.of(context).backgroundColor, body: const Center( child: Text( 'Break Time!', ), ), ), ); }, ), ); //duration await Future.delayed(const Duration(seconds: 3)); // pop!! if (mounted) Navigator.of(context).pop(); mounted란 현재 tree 안에 state object가 있는지를 bool 값으로 알려준다. async-await에 contex..

Dart & Flutter 2023.04.14

[Paper] CADTransformer: Panoptic Symbol Spotting Transformer for CAD Drawings (3)

Improving Transformer Backbone Design for Better Spotting Self-Attention with Neighbor Awareness Self-attention within k Neighbors 가장 가까운 k개의 neighbor token들에대해서 attention 연산을 수행 local feature를 사용하여 각 graphic entity들에대해 최적화할 수 있고 임의 크기의 CAD drawing에도 확장할 수 있음 최소 거리는 모든 entity들 간의 시작점과 끝점을 확인하여 계산 model capacity를 향상시키기위해 nearest token 개수를 늘리는 것이 좋다고 하며 architecture에 있는 4개의 stage는 다음 stage에서 연산할 수..

Deep Learning 2023.04.09

[Paper] CADTransformer: Panoptic Symbol Spotting Transformer for CAD Drawings (2)

Methodology Tokenizing with Graphical Primitives 래스터 이미지에서 feature map을 추출하기위해 HRNetV2-W48 모델을 사용 graphical primitive들(호, 선 등)로 분해 bilinear로 feature vector를 interpolation primitive의 중간 위치 좌표를 feature map에 projection Figure 3 (b)에 나타난 것처럼 feature map을 추출할 때에만 래스터 이미지를 사용하고 이외에는 CAD Drawing(vector image)을 사용한다. 또한 그림에서 vertex alignment라는 부분은 2, 3 과정이라 생각되며 코드를 확인해보면 pytorch의 grid_sample 함수로 2번 과정을..

Deep Learning 2023.04.08

[Paper] CADTransformer: Panoptic Symbol Spotting Transformer for CAD Drawings (1)

Introduction 1.1. A Primer for CAD Panoptic Symbol Spotting Symbol은 엔지니어링, 전기, 건축 등의 도면을 그릴때 사용을 하는데 이 Symbol을 spotting(detection)하는 것은 결정적인 역할을 한다. 건축에서 2D CAD 도면은 정확한 geometric과 단면도의 semantic information으로 구성되어있어 3D 모델이 효율적으로 정확하게 만들어질 수 있게 해준다. 규칙적인 픽셀 그리드에 arrange된 다른 이미지들과는 달리 CAD 도면들은 graphical primitives(호, 원, 다각선 등)으로 이루어져있다. CAD 도면에서 occlusion(선이 연결되어있는지 끊겨있는지), cluster, apperance varia..

Deep Learning 2023.04.07

동시성, 원자성, 동기화, 교착상태(deadlock)

동시성 여러 가지 일이 동시에 진행되는 것을 말한다. 예를 들어서 program을 다운로드 받으면서 youtube를 보는 것과 같다. 원자성 동시성이 일어날때 같은 자원을 사용할 수도 있다. 그러면 하나씩 독점하여 사용한다. 예를 들어서 화장실(자원)의 빈 칸을 찾아 잠그고(lock) 볼일을 다 본 후 잠금을 풀고(unlock) 나오는 행위와 비슷하다. 동기화 신호등으로 교통정리하는 것과 화장실의 잠금 장치의 필요성과 유사하다. 교착상태(deadlock) A라는 사람이 화장실에 들어가서 볼일을 보는데 휴지라는 자원이 없어서 못나간다. 하지만 밖에서는 휴지를 가지고 기다리는 사람들이 줄을 서고 있다. 이렇게 A라는 사람이 자원을 얻지 못해 다음 처리를 하지 못하는 상태를 교착상태(deadlock)이라고 한다.

CS 2023.03.15

시간 관리 기법과 추천 도서

시간 관리는 효율적인 업무 수행과 생산성 향상을 위해 매우 중요한 기술입니다. 시간을 효율적으로 관리하는 것은 다양한 기술과 방법을 적용하면 가능합니다. 아래는 일반적으로 사용되는 시간 관리 기법 중 일부입니다: 일정관리: 하루 일정을 미리 계획하고 우선순위를 정해두는 것입니다. 이를 위해 다양한 일정관리 앱과 도구를 활용할 수 있습니다. Pomodoro 기법: 일정한 시간 동안 집중하고, 그 시간이 끝나면 짧은 휴식을 취하는 방법입니다. 대개 25분 동안 집중하고 5분 정도 휴식하는 방식을 취합니다. Eat that Frog: 일을 시작하면 가장 어려운 작업부터 먼저 처리하는 방법입니다. 이를 통해 남은 작업을 처리하는데 더욱 적극적으로 접근할 수 있습니다. Eisenhower Matrix: 시급하고 ..

Temp 2023.03.06

[Flutter/TextFormField] errorText는 표시하지 않고 errorBorder 표시

errorText를 표시하지 않고 Border의 색상만 바꾸고 싶을때 다음과 같이 errorStyle에서 height를 0으로 지정하고 validator에서 빈 문자를 return해주면 된다. 만약 그냥 빈 문자만 return한다면 TextFormField 아래에 공간이 생긴다. TextFormField( decoration: const InputDecoration( errorStyle: TextStyle(height: 0), ), validator: (_) => error ? '' : null, ), [reference] https://stackoverflow.com/questions/56426262/how-to-remove-error-message-in-textformfield-in-flutter

Dart & Flutter 2023.03.05

[Flutter] FlutterError (A dismissed Dismissible widget is still part of the tree. Make sure to implement the onDismissed handler and to immediately remove the Dismissible widget from the application once that handler has fired.)

FlutterError (A dismissed Dismissible widget is still part of the tree. Make sure to implement the onDismissed handler and to immediately remove the Dismissible widget from the application once that handler has fired.) ListView, Wrap 등에 Dismissible을 사용하면서 위와 같은 에러가 발생한다면 Dismissible의 key를 unique하게 지정해주면 된다. 예를 들어서 다음과 같이 index를 key value에 넣어서 지정해주는 것은 안된다. for (int index = 0; index < state.keywo..

Dart & Flutter 2023.03.05

[Flutter] BuildContext 이해하기

BuildContext는 Flutter에서 중요한 개념 중 하나이다. 따라서 BuildContext가 무엇인지 이해해보자. Flutter widget tree flutter에서 모든 것은 widget이다. container, text, button 등등... 그리고 이 widget들이 쌓여 구성된 것을 widget tree라고 부른다. widget tree는 root widget을 가지고 있으며 parent widget들과 child widgets들도 있음을 의미한다. 어떤 widget이 다른 widget을 rendering한다면 그것은 parent widget이며 rendering되는 것은 child widget이다. BuildContext가 뭐야? BuildContext는 tree 내의 각 widge..

Dart & Flutter 2023.02.24

[Flutter] context watch, read, select의 차이

watch context.watch() 에서 T가 변할 때마다 값을 받는다. 예를 들어서 버튼을 누를때마다 화면에 나오는 숫자가 변해야한다면 watch를 사용한다. read context.read() 에서 T가 watch에서처럼 변할 때마다 값을 받지 않는다. 예를 들어서 버튼을 누를때 발생하는 이벤트(함수)를 사용하기위해 사용한다. select watch에서 T가 변할때마다 값을 받았다면 select는 T 안의 어떤 특정 부분이 변할때마다 값을 받는 것이다. 예를 들어서 T에 status(loading, success, failure)가 있다고 하고 context.select((boc) => bloc.state.status) 처럼 status가 변할때마다 값을 받을 수 있다.

Dart & Flutter 2023.02.23
728x90