Sfoglia il codice sorgente

Fix installation with pip

boomb0om 2 anni fa
parent
commit
a455668909
4 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 1 1
      CRAFT/__init__.py
  2. 1 0
      CRAFT/basenet/__init__.py
  3. 1 1
      CRAFT/craft.py
  4. 1 1
      setup.py

+ 1 - 1
CRAFT/__init__.py

@@ -1,2 +1,2 @@
 from .model import CRAFTModel, preprocess_image
-from .utils import draw_boxes, draw_polygons, boxes_area, polygons_area
+from .utils import draw_boxes, draw_polygons, boxes_area, polygons_area

+ 1 - 0
CRAFT/basenet/__init__.py

@@ -0,0 +1 @@
+from .vgg16_bn import vgg16_bn, init_weights

+ 1 - 1
CRAFT/craft.py

@@ -8,7 +8,7 @@ import torch
 import torch.nn as nn
 import torch.nn.functional as F
 
-from .basenet.vgg16_bn import vgg16_bn, init_weights
+from .basenet import vgg16_bn, init_weights
 from .utils import copyStateDict
 from .fp16 import FP16Module
 

+ 1 - 1
setup.py

@@ -10,7 +10,7 @@ setup(
     description="",
     author="Igor Pavlov, Youngmin Baek, Bado Lee, Dongyoon Han, Sangdoo Yun, Hwalsuk Lee",
     url='https://github.com/boomb0om/CRAFT-text-detection',
-    packages=find_packages(include=['CRAFT']),
+    packages=find_packages(include=['CRAFT', 'CRAFT/basenet']),
     install_requires=[
         str(r)
         for r in pkg_resources.parse_requirements(