본문 바로가기

프로그래밍/AI:ML:DL

[번역|Yolo|darknet] darknet 구현에 대한 비교 (ycombinator)

반응형

from : https://news.ycombinator.com/item?id=18317879

joshvm on 2018-10-28

몇달동안 darknet 을 테스트 해 봄. 진지한 프로젝트에는 추천하지 않는다. 라즈베리파이에서 사용하거나, 매우 빨리 가져다 쓸려면 모를까. tiny yolo 면 1.2 FPS 성능이 나온다. 아니면 신경망스틱을 사는 게 낫다. yolo 자체는 매우 인상적이다. 빠르고 정확해서 여러 용도에 쓸 수 있다.

오리지널 레포 ( github pjreddie darknet ) 은 업데이트가 많지 않다. AlexeyAB 의 포크 ( github alexeyab darknet ) 에 개선사항이 많다. 하지만 여전히 괴로운 부분이 있다.

  • 뭔가 실수했을 때, 아무 메시지 없이 실패한다. 이게 가장 큰 문제다. train/test 할 때 매우 어려운데, 어디를 잘못했는지 알아내기가 매우 어렵다.
  • 이미지 파일에 대한 지원여부가 또 어렵다. opencv 로 컴파일하지만, 내부에 특정 이미지 타입을 무시하는 glob 이 있다. (tiff 를 사용하고 싶으면 리컴파일해야 한다.)
  • 바운딩박스 저장포맷도 괴상하다. 실수하기 좋다. 박스의 중심점과 이미지너비에 대한 비율로 저장되어 있다.
  • 로깅이 기본밖에 안 되어 있다. Alexy 가 로쓰 그래프를 추가했지만, 그게 다다. 어떤 체크포인트에서 다시 훈련하면, 재시작한 시점부터의 로쓰 그래프만 나온다.
  • 자신의 데이터로 훈련하는 데에 흑마술이 너무 많다. "이 설정파일을 복사하고, 저 값들을 수정하고" 하는 게 많다. 이걸 실수하면, 하루치 훈련이 낭비된다.

Yolo 를 사용하고 싶다면, 내 추천은, pytorch 같은 좀 더 성숙한 프레임워크로 재구현된 걸 써보는 것이다. ( 예를 들어 : https://eavis.gitlab.io/lightnet/ )


joshvm on Oct 28, 2018 [-]

I've used darknet quite a bit over the last few months. I wouldn't recommend using it for a serious project, unless you happen to need an extremely fast off-the-shelf object detector. The other exception is if you need a fast convnet running on a Pi - Tiny Yolo will do about 1.2FPS with an optimised fork (using nnpack). Other than that you could just buy a Neural Compute Stick. Yolo itself is pretty great - it's very fast and is accurate enough for a lot of things.
The original repo isn't really updated, and while AlexyAB's fork is much improved, it's still a pain to use.

  • If you make mistakes, things fail silently. This is by far the biggest problem. Train/test is difficult to get right because it's very difficult to figure out where exactly you've messed up.
  • Support for images is arbitrary. Although you can compile with OpenCV, there are internal glob functions which simply ignore certain image types (I had to recompile it with support for TIFF, for example).
  • Bounding boxes are stored in an awkward format, which is easy to get wrong. It's referenced to the centre of the box, stored as a fraction of the image width.
  • Logging is very basic. Alexey added a loss graph, but that's about it. If you restart training from a checkpoint, you only get a loss curve from where you restarted.
  • Retraining on your own data can seem like dark magic. There's a lot of "copy this config file and edit these numbers" and if you get it wrong, you've wasted a day training.

If you need to use Yolo, I'd recommend looking at reimplementations in more mature frameworks like pytorch (e.g. https://eavise.gitlab.io/lightnet/ )

728x90