rockeycoss commited on
Commit
c08f9fa
1 Parent(s): c7e1959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -26
app.py CHANGED
@@ -1,32 +1,32 @@
1
  import os
2
 
3
  SPACE_ID = os.getenv('SPACE_ID')
4
- if SPACE_ID is not None:
5
- # running on huggingface space
6
- os.system(r'mkdir ckpt')
7
- os.system(
8
- r'python -m wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth -o ckpt/sam_vit_b_01ec64.pth')
9
- os.system(
10
- r'python -m wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth -o ckpt/sam_vit_l_0b3195.pth')
11
- os.system(
12
- r'python -m wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth -o ckpt/sam_vit_h_4b8939.pth')
13
-
14
- os.system(
15
- r'python -m wget https://github.com/HDETR/H-Deformable-DETR/releases/download/v0.1'
16
- r'/r50_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_36eps.pth -o ckpt/r50_hdetr.pth')
17
- os.system(
18
- r'python -m wget https://github.com/HDETR/H-Deformable-DETR/releases/download/v0.1'
19
- r'/swin_tiny_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_36eps.pth -o ckpt/swin_t_hdetr.pth')
20
- os.system(
21
- r'python -m wget https://github.com/HDETR/H-Deformable-DETR/releases/download/v0.1/decay0.05_drop_path0'
22
- r'.5_swin_large_hybrid_branch_lambda1_group6_t1500_n900_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_36eps.pth -o ckpt/swin_l_hdetr.pth')
23
- os.system(r'python -m wget https://projects4jw.blob.core.windows.net/focalnet/release/detection'
24
- r'/focalnet_large_fl4_o365_finetuned_on_coco.pth -o ckpt/focalnet_l_dino.pth')
25
-
26
- os.system(r'python tools/convert_ckpt.py ckpt/r50_hdetr.pth ckpt/r50_hdetr.pth')
27
- os.system(r'python tools/convert_ckpt.py ckpt/swin_t_hdetr.pth ckpt/swin_t_hdetr.pth')
28
- os.system(r'python tools/convert_ckpt.py ckpt/swin_l_hdetr.pth ckpt/swin_l_hdetr.pth')
29
- os.system(r'python tools/convert_ckpt.py ckpt/focalnet_l_dino.pth ckpt/focalnet_l_dino.pth')
30
  import warnings
31
  from collections import OrderedDict
32
  from pathlib import Path
 
1
  import os
2
 
3
  SPACE_ID = os.getenv('SPACE_ID')
4
+ # if SPACE_ID is not None:
5
+ # # running on huggingface space
6
+ # os.system(r'mkdir ckpt')
7
+ # os.system(
8
+ # r'python -m wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth -o ckpt/sam_vit_b_01ec64.pth')
9
+ # os.system(
10
+ # r'python -m wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth -o ckpt/sam_vit_l_0b3195.pth')
11
+ # os.system(
12
+ # r'python -m wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth -o ckpt/sam_vit_h_4b8939.pth')
13
+
14
+ # os.system(
15
+ # r'python -m wget https://github.com/HDETR/H-Deformable-DETR/releases/download/v0.1'
16
+ # r'/r50_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_36eps.pth -o ckpt/r50_hdetr.pth')
17
+ # os.system(
18
+ # r'python -m wget https://github.com/HDETR/H-Deformable-DETR/releases/download/v0.1'
19
+ # r'/swin_tiny_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_36eps.pth -o ckpt/swin_t_hdetr.pth')
20
+ # os.system(
21
+ # r'python -m wget https://github.com/HDETR/H-Deformable-DETR/releases/download/v0.1/decay0.05_drop_path0'
22
+ # r'.5_swin_large_hybrid_branch_lambda1_group6_t1500_n900_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_36eps.pth -o ckpt/swin_l_hdetr.pth')
23
+ # os.system(r'python -m wget https://projects4jw.blob.core.windows.net/focalnet/release/detection'
24
+ # r'/focalnet_large_fl4_o365_finetuned_on_coco.pth -o ckpt/focalnet_l_dino.pth')
25
+
26
+ # os.system(r'python tools/convert_ckpt.py ckpt/r50_hdetr.pth ckpt/r50_hdetr.pth')
27
+ # os.system(r'python tools/convert_ckpt.py ckpt/swin_t_hdetr.pth ckpt/swin_t_hdetr.pth')
28
+ # os.system(r'python tools/convert_ckpt.py ckpt/swin_l_hdetr.pth ckpt/swin_l_hdetr.pth')
29
+ # os.system(r'python tools/convert_ckpt.py ckpt/focalnet_l_dino.pth ckpt/focalnet_l_dino.pth')
30
  import warnings
31
  from collections import OrderedDict
32
  from pathlib import Path