'프로그램 사용/yolo_tensorflow'에 해당되는 글 126건

  1. 2026.06.01 STFPM 실행
  2. 2026.05.27 딥러닝 학습 관련(epoch, loss)
  3. 2026.05.21 NAS - Neural Architecture Search
  4. 2026.05.21 MCUNet
  5. 2026.05.20 STFPM - Student-Teacher Feature Pyramid Matching
  6. 2026.05.20 EfficientAD
  7. 2026.05.20 patchcore
  8. 2026.05.20 MVTec AD 데이터 셋
  9. 2026.05.19 VAD - PaDiM, Patchcore - 정상이 아님을 탐지
  10. 2026.05.14 U-net, segmentation

언제나 그렇듯(!) 1080은 돌리기 힘든 시대구만.. 저번에 찾아둔 걸로 버전 맞추고

pip3 uninstall -y torch torchvision torchaudio xformers
pip3 install torch==2.6.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip3 install xformers==0.0.29.post2

 

-mvtec-ad 는 dataset 다운로드 받아 압축푼 최상위 디렉토리를 지정해주면 된다.

~/src/STFPM/mvtec-ad$ tree -d -L 2
.
├── bottle
│   ├── ground_truth
│   ├── test
│   └── train
├── cable
│   ├── ground_truth
│   ├── test
│   └── train
├── capsule
│   ├── ground_truth
│   ├── test
│   └── train
├── carpet
│   ├── ground_truth
│   ├── test
│   └── train
├── grid
│   ├── ground_truth
│   ├── test
│   └── train
├── hazelnut
│   ├── ground_truth
│   ├── test
│   └── train
├── leather
│   ├── ground_truth
│   ├── test
│   └── train
├── metal_nut
│   ├── ground_truth
│   ├── test
│   └── train
├── pill
│   ├── ground_truth
│   ├── test
│   └── train
├── screw
│   ├── ground_truth
│   ├── test
│   └── train
├── tile
│   ├── ground_truth
│   ├── test
│   └── train
├── toothbrush
│   ├── ground_truth
│   ├── test
│   └── train
├── transistor
│   ├── ground_truth
│   ├── test
│   └── train
├── wood
│   ├── ground_truth
│   ├── test
│   └── train
└── zipper
    ├── ground_truth
    ├── test
    └── train

 

$ python3 main.py train --mvtec-ad  mvtec-ad --category carpet --epochs 200
...
[198/200] loss: 0.145916
[198/200] loss: 0.147569
[198/200] loss: 0.147157
[198/200] loss: 0.146806
[198/200] loss: 0.147341
[198/200] loss: 0.145462
[198/200] loss: 0.144424
Valid Loss: 0.0001142
[199/200] loss: 0.146722
[199/200] loss: 0.146246
[199/200] loss: 0.145853
[199/200] loss: 0.145966
[199/200] loss: 0.145793
[199/200] loss: 0.145863
[199/200] loss: 0.154857
Valid Loss: 0.0001460

real 9m35.951s
user 31m24.301s
sys 1m16.579s

 

loss 만 보고 학습을 하게 했네. 

그래도 200 epoch 인데 내부는 어떤지 모르겠지만 10분 컷이면 양호하네

 

cpu 로 1개 코어만 사용해서 하는데 제법 걸린다. 이미지로 판별하고 출력할 수 없나?

$ time python3 main.py test --mvtec-ad  mvtec-ad --category carpet --checkpoint snapshots/carpet/best.pth.tar
load snapshots/carpet/best.pth.tar
Catergory: carpet Pixel-AUC: 0.990288 Image-AUC: 0.955859 PRO: 0.959637

real 5m39.944s
user 5m46.592s
sys 0m1.064s

 

tar 라면서 왜 zip 이래?!?

~/src/STFPM/snapshots/carpet$ file *
best.pth.tar: Zip archive data, at least v0.0 to extract, compression method=store

~/src/STFPM/snapshots/carpet$ ll -h
total 43M
drwxrwxr-x 2 falinux falinux 4.0K  6월  1 11:57 ./
drwxrwxr-x 3 falinux falinux 4.0K  6월  1 11:14 ../
-rw-rw-r-- 1 falinux falinux  43M  6월  1 11:52 best.pth.tar

 

[링크 : https://github.com/gdwang08/STFPM]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

딥러닝 학습 관련(epoch, loss)  (0) 2026.05.27
NAS - Neural Architecture Search  (0) 2026.05.21
MCUNet  (0) 2026.05.21
STFPM - Student-Teacher Feature Pyramid Matching  (0) 2026.05.20
EfficientAD  (0) 2026.05.20
Posted by 구차니

 

-----

metric 함수. 얘도 함수였구나.

아무튼 metric은 격하게 오락가락 하고

[링크 : https://modulabs.co.kr/blog/loss-versus-accuracy]

 

loss 가 점진적 감소 -> 잘 학습

loss 급격히 감소 후 유지 -> 정상

loss 일정 시점 이후 증가 -> over fitting

[링크 : https://m.blog.naver.com/datapreprep/223748771141]

 

근데.. underfitting은 먼지 감이 안오네.

When to change the number of epochs (training cycles)

Selecting the appropriate number of epochs is a balance between underfitting and overfitting.

Underfitting: One of the most straightforward indicators of underfitting is if the model performs poorly on the training data. This can be observed in Edge Impulse Studio through metrics such as accuracy, or loss, depending on the type of problem (classification or regression). If these metrics indicate poor performance, it suggests that the model has not learned the patterns of the data well. In that case, increasing the number of epochs can improve your model performance. Please note that other solutions exist such as increasing your neural network architecture complexity, changing the preprocessing technique or reducing regularization.

Overfitting: Detecting overfitting involves recognizing when the model has learned too much from the training data, including its noise and outliers, to the detriment of its performance on new, unseen data. Overfitting is characterized by the model performing exceptionally well on the training data but poorly on the validation or test data. Evaluating overfitting can be achieved by comparing the performance of the model between the training set and the validation set during training. When the performance on the validation set starts to degrade, it might indicate that the model is beginning to overfit the training data. In that case, decreasing the number of epochs can improve your model performance. As with underfitting, other solutions exist to reduce overfitting such as increasing the number of training data, adding regularization techniques to add penalties on large weights, adding dropout layers, simplifying the model architecture and even using early stopping.



[링크 : https://docs.edgeimpulse.com/knowledge/concepts/machine-learning/neural-networks/epochs]

 

overfitting 중인 loss 값 이라는데, 

 

학습셋이 너무 적을 경우 overfitting이 빠르게 발생하는 것으로 보인다.

그나저나 저 130 miliion parameter는 ssd300 에서 어떻게 산출된걸까?

What you are experiencing is called overfitting and it happens because of your very small dataset.
All the model cares about is performance on the training dataset, so given the opportunity, it will simply attempt to memorize it. This is what happens in you case, you feed a model which contains over 130 Million parameters less than 319 images.
So regarding your questions:
  1. The loss function shows a clear case of overfitting.
  2. On general, it is okay to use a trained model, especially when you only have a small dataset, but in your case, the dataset is too small for any deep-learning model. When I say small dataset, I mean 10k images, not several hundreds.
  3. You should not train for longer time, once the validation loss stops improving, it is a clear sign to stop. There is even a training technique named "early stopping" which is designed to stop training once the validation loss stops to drop.
You have to understand that currently, your dataset of 300 images, is irrelevant to the world of deep-learning. So if you still want to use it for object detection, you need to revert to more classic computer-vision techniques like using HOG or SIFT features, or even manually engineering the features for your special case.
 

[링크 : https://datascience.stackexchange.com/questions/46456/issues-with-training-ssd-on-own-dataset]

 

The SSD300 has 35.6 million parameters, while the SSDlite320 has about a tenth of them, i.e., 3.4 million.

[링크 : https://www.mdpi.com/2673-6470/3/3/12]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

STFPM 실행  (0) 2026.06.01
NAS - Neural Architecture Search  (0) 2026.05.21
MCUNet  (0) 2026.05.21
STFPM - Student-Teacher Feature Pyramid Matching  (0) 2026.05.20
EfficientAD  (0) 2026.05.20
Posted by 구차니

MCUNet 보다 보니 NAS  라는게 보여서 찾아봄

Search NN model on an existing library e.g., ProxylessNAS, MnasNet

[링크 : https://hanlab18.mit.edu/projects/tinyml/mcunet/assets/MCUNet-slides.pdf]

 

Neural Architecture Search 

[링크 : https://doing-ai.tistory.com/entry/Neural-Architecture-Search-NAS-Hardware-Aware-NAS-ProxylessNAS]

 

EfficientNAS 이후에 나온 더욱 효율적인 NAS를 위한 논문, ProxylessNAS다. TuNAS의 근간이 된 논문이기도 하며, 구체적으로 알아보자.

[링크 : https://seokdonge.tistory.com/27] ProxylessNAS

[링크 : https://ech97.tistory.com/entry/MnasNet] MnasNet

 

TuNAS

[링크 : https://seokdonge.tistory.com/26]

[링크 : https://openaccess.thecvf.com/content_CVPR_2020/papers/Bender_Can_Weight_Sharing_Outperform_Random_Architecture_Search_An_Investigation_With_CVPR_2020_paper.pdf]

[링크 : https://github.com/google-research/google-research/tree/master/tunas]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

STFPM 실행  (0) 2026.06.01
딥러닝 학습 관련(epoch, loss)  (0) 2026.05.27
MCUNet  (0) 2026.05.21
STFPM - Student-Teacher Feature Pyramid Matching  (0) 2026.05.20
EfficientAD  (0) 2026.05.20
Posted by 구차니

STFPM -> PaSTe -> MCUNet 으로 찾아옴

[링크 : https://github.com/AMCO-UniPD/PaSTe]

 

MCU 에서 돌릴만큼 경량 네트워크

[링크 : https://cowkim-svd.tistory.com/7]

 

[링크 : https://github.com/mit-han-lab/mcunet]

 

 

 

[링크 : https://www.youtube.com/watch?v=YvioBgtec4U]

[링크 : https://www.youtube.com/watch?v=0pUFZYdoMY8]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

딥러닝 학습 관련(epoch, loss)  (0) 2026.05.27
NAS - Neural Architecture Search  (0) 2026.05.21
STFPM - Student-Teacher Feature Pyramid Matching  (0) 2026.05.20
EfficientAD  (0) 2026.05.20
patchcore  (0) 2026.05.20
Posted by 구차니

[링크 : https://github.com/gdwang08/STFPM]

[링크 : https://blog.naver.com/kingjykim/223495332696]

 

[링크 : https://claude.ai/share/6d307c41-77bc-411e-90a8-982fb5ce0467]

 

STFPM PaSTe

Student-Teacher Feature Pyramid Matching

[링크 : https://www.alphaxiv.org/ko/overview/2503.02691v1]

 

Partially Shared Teacher-student

Our results show that PaSTe decreases the inference time by 25%, while reducing the training time by 33% and peak RAM usage during training by 76%.

[링크 : https://github.com/AMCO-UniPD/PaSTe]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

NAS - Neural Architecture Search  (0) 2026.05.21
MCUNet  (0) 2026.05.21
EfficientAD  (0) 2026.05.20
patchcore  (0) 2026.05.20
MVTec AD 데이터 셋  (0) 2026.05.20
Posted by 구차니

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

MCUNet  (0) 2026.05.21
STFPM - Student-Teacher Feature Pyramid Matching  (0) 2026.05.20
patchcore  (0) 2026.05.20
MVTec AD 데이터 셋  (0) 2026.05.20
VAD - PaDiM, Patchcore - 정상이 아님을 탐지  (0) 2026.05.19
Posted by 구차니

VAD 분야 SOTA(state of the art. 별걸 다 줄여 -_-) 모델이라는데 무거워서 모바일이나 엣지에서 돌리긴 좀 무리일 듯.

 

[링크 : https://coderecording.tistory.com/9]

[링크 : https://github.com/amazon-science/patchcore-inspection]

[링크 : https://github.com/tiskw/patchcore-ad]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

STFPM - Student-Teacher Feature Pyramid Matching  (0) 2026.05.20
EfficientAD  (0) 2026.05.20
MVTec AD 데이터 셋  (0) 2026.05.20
VAD - PaDiM, Patchcore - 정상이 아님을 탐지  (0) 2026.05.19
U-net, segmentation  (0) 2026.05.14
Posted by 구차니

가장 만만한(?) 데이터 셋인 것 같은데

DAGM 데이터셋은 총 10가지 도메인의 데이터로 구성되어 있으며, 모델링을 통해 가상으로 결함을 합성하여 만든 데이터셋입니다. NanoTWICE 데이터셋은 nanofibrous material 데이터이며 5장의 정상 데이터와 40장의 결함 데이터로 구성이 되어있습니다

자, 이제 오늘의 본론인 MVTec-AD 데이터셋에 대해 설명드리겠습니다. 앞서 설명드렸던 DAGM, NanoTWICE의 아쉬웠던 부분들을 개선하며 총 15종류의 도메인의 데이터셋을 구축하였습니다. 크게는 Texture와 Object로 구분을 하였고, 각각 5가지, 10가지 종류의 도메인 데이터로 구성이 되어있습니다

[링크 : https://hoya012.github.io/blog/MVTec-AD/]

 

5.3 GB(!!)

[링크 : https://www.kaggle.com/datasets/ipythonx/mvtec-ad]

[링크 : https://www.mvtec.com/research-teaching/datasets/mvtec-ad]

[링크 : https://huggingface.co/datasets/Voxel51/mvtec-ad]

 

5.9 GB(!!!)

[링크 : https://www.kaggle.com/datasets/mhskjelvareid/dagm-2007-competition-dataset-optical-inspection]

[링크 : https://github.com/M-3LAB/awesome-industrial-anomaly-detection]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

EfficientAD  (0) 2026.05.20
patchcore  (0) 2026.05.20
VAD - PaDiM, Patchcore - 정상이 아님을 탐지  (0) 2026.05.19
U-net, segmentation  (0) 2026.05.14
QAT, PTQ .. 모델 경량화  (0) 2026.05.14
Posted by 구차니

비정상을 학습시키는게 아니라

정상만 학습시키고 정상에서 벗어나는 것을 탐지하는 기법

 

PaDiM

Ganomaly (GAN + Anomaly Detection)

[링크 : https://actionpower.medium.com/액션파워-lab-이미지에서-이상-영역-탐지-visual-anomaly-detection-는-어떻게-할까-6da65866366b]

 

PaDiM-Lite / PatchCore-Lite

[링크 : https://www.alphaxiv.org/ko/overview/2603.20288v1]

 

PaDiM (Patch Ditrubution Modeling)

[링크 : https://huggingface.co/papers/2011.08785]

[링크 : https://data-analysis-expertise.tistory.com/128]

[링크 : https://dippingtodeepening.tistory.com/110]

[링크 : https://cumulu-s.tistory.com/44]

 

VAD - Visual Anomaly Detection

MVTec-AD, MVTec-3D, MVTec-LOCO, VisA  데이터 셋

[링크 : https://velog.io/@barley_15/논문-리뷰-A-Survey-on-Visual-Anomaly-Detection-Challenge-Approach-and-Prospect]

 

PatchCore

[링크 : https://velog.io/@ljwljy51/PatchCore-Paper-Review]

 

PatchCore

SPADE , PaDiM

[링크 : https://ffighting.net/deep-learning-paper-review/anomaly-detection/patchcore/]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

patchcore  (0) 2026.05.20
MVTec AD 데이터 셋  (0) 2026.05.20
U-net, segmentation  (0) 2026.05.14
QAT, PTQ .. 모델 경량화  (0) 2026.05.14
unet  (0) 2026.05.06
Posted by 구차니

 

[링크 : https://github.com/PINTO0309/TensorflowLite-UNet]

[링크 : https://huggingface.co/qualcomm/Unet-Segmentation]

[링크 : https://github.com/milesial/Pytorch-UNet]

[링크 : https://github.com/Rumit95/Auto_Segmentation] semantic segmentation

[링크 : https://github.com/Rumit95/Semantic-Segmentation-of-Image]

 

 

  • 클래스 1: 애완 동물에 속하는 픽셀
  • 클래스 2: 애완동물과 접하는 픽셀
  • 클래스 3: 위에 속하지 않음/주변 픽셀

[링크 : https://www.tensorflow.org/tutorials/images/segmentation?hl=ko]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

MVTec AD 데이터 셋  (0) 2026.05.20
VAD - PaDiM, Patchcore - 정상이 아님을 탐지  (0) 2026.05.19
QAT, PTQ .. 모델 경량화  (0) 2026.05.14
unet  (0) 2026.05.06
keras - transfer learning / fine tuning  (0) 2025.09.17
Posted by 구차니