efengx commited on
Commit
36e5a07
·
1 Parent(s): bd5fe6f

fix: update

Browse files
fengx_launch.ipynb CHANGED
@@ -33,7 +33,7 @@
33
  },
34
  {
35
  "cell_type": "code",
36
- "execution_count": 11,
37
  "metadata": {},
38
  "outputs": [],
39
  "source": [
 
33
  },
34
  {
35
  "cell_type": "code",
36
+ "execution_count": null,
37
  "metadata": {},
38
  "outputs": [],
39
  "source": [
fengxai/SelfSupervised.py CHANGED
@@ -25,7 +25,7 @@ class SelfSupervised:
25
  "fengxai/config/GroundingDINO_SwinT_OGC.py", "weights/groundingdino_swint_ogc.pth")
26
 
27
 
28
- def checkAnnotate(image_source: np.ndarray, boxes: torch.Tensor, logits: torch.Tensor, phrases: List[str]):
29
  # 在原始图像中添加boxes
30
  h, w, _ = image_source.shape
31
  boxes = boxes * torch.Tensor([w, h, w, h])
@@ -49,7 +49,6 @@ class SelfSupervised:
49
  # 预测图片
50
  def imagePredict(self, imageFile, item="clothing", boxThreshold=0.3, textTreshold=0.25):
51
  from groundingdino.util.inference import load_image, predict
52
- print("imgFile=", imageFile)
53
  src, img = load_image(imageFile)
54
  h, w, _ = src.shape
55
  boxes, logits, phrases = predict(
 
25
  "fengxai/config/GroundingDINO_SwinT_OGC.py", "weights/groundingdino_swint_ogc.pth")
26
 
27
 
28
+ def checkAnnotate(self, image_source: np.ndarray, boxes: torch.Tensor, logits: torch.Tensor, phrases: List[str]):
29
  # 在原始图像中添加boxes
30
  h, w, _ = image_source.shape
31
  boxes = boxes * torch.Tensor([w, h, w, h])
 
49
  # 预测图片
50
  def imagePredict(self, imageFile, item="clothing", boxThreshold=0.3, textTreshold=0.25):
51
  from groundingdino.util.inference import load_image, predict
 
52
  src, img = load_image(imageFile)
53
  h, w, _ = src.shape
54
  boxes, logits, phrases = predict(
fengxai/__pycache__/SelfSupervised.cpython-38.pyc ADDED
Binary file (3.1 kB). View file
 
fengxai/__pycache__/inference.cpython-38.pyc CHANGED
Binary files a/fengxai/__pycache__/inference.cpython-38.pyc and b/fengxai/__pycache__/inference.cpython-38.pyc differ
 
fengxai/__pycache__/render.cpython-38.pyc CHANGED
Binary files a/fengxai/__pycache__/render.cpython-38.pyc and b/fengxai/__pycache__/render.cpython-38.pyc differ
 
fengxai/inference.py CHANGED
@@ -18,6 +18,5 @@ def imagePrediction(imageFile, funcCallback):
18
  os.system(cmd)
19
 
20
  selfSupervised = SelfSupervised()
21
- print("imageFile=", imageFile)
22
  funcCallback(selfSupervised.imagePredict(imageFile))
23
 
 
18
  os.system(cmd)
19
 
20
  selfSupervised = SelfSupervised()
 
21
  funcCallback(selfSupervised.imagePredict(imageFile))
22