glenn-jocher commited on
Commit
2754ada
β€’
1 Parent(s): 9b6dba6

Remove `/weights` directory (#3659)

Browse files

* Remove `/weights` directory

* cleanup

.github/workflows/ci-testing.yml CHANGED
@@ -64,15 +64,15 @@ jobs:
64
  di=cpu # inference devices # define device
65
 
66
  # train
67
- python train.py --img 128 --batch 16 --weights weights/${{ matrix.model }}.pt --cfg models/${{ matrix.model }}.yaml --epochs 1 --device $di
68
  # detect
69
- python detect.py --weights weights/${{ matrix.model }}.pt --device $di
70
  python detect.py --weights runs/train/exp/weights/last.pt --device $di
71
  # test
72
- python test.py --img 128 --batch 16 --weights weights/${{ matrix.model }}.pt --device $di
73
  python test.py --img 128 --batch 16 --weights runs/train/exp/weights/last.pt --device $di
74
 
75
  python hubconf.py # hub
76
- python models/yolo.py --cfg models/${{ matrix.model }}.yaml # inspect
77
- python models/export.py --img 128 --batch 1 --weights weights/${{ matrix.model }}.pt # export
78
  shell: bash
 
64
  di=cpu # inference devices # define device
65
 
66
  # train
67
+ python train.py --img 128 --batch 16 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $di
68
  # detect
69
+ python detect.py --weights ${{ matrix.model }}.pt --device $di
70
  python detect.py --weights runs/train/exp/weights/last.pt --device $di
71
  # test
72
+ python test.py --img 128 --batch 16 --weights ${{ matrix.model }}.pt --device $di
73
  python test.py --img 128 --batch 16 --weights runs/train/exp/weights/last.pt --device $di
74
 
75
  python hubconf.py # hub
76
+ python models/yolo.py --cfg ${{ matrix.model }}.yaml # inspect
77
+ python models/export.py --img 128 --batch 1 --weights ${{ matrix.model }}.pt # export
78
  shell: bash
Dockerfile CHANGED
@@ -46,8 +46,5 @@ ENV HOME=/usr/src/app
46
  # Bash into stopped container
47
  # id=$(sudo docker ps -qa) && sudo docker start $id && sudo docker exec -it $id bash
48
 
49
- # Send weights to GCP
50
- # python -c "from utils.general import *; strip_optimizer('runs/train/exp0_*/weights/best.pt', 'tmp.pt')" && gsutil cp tmp.pt gs://*.pt
51
-
52
  # Clean up
53
  # docker system prune -a --volumes
 
46
  # Bash into stopped container
47
  # id=$(sudo docker ps -qa) && sudo docker start $id && sudo docker exec -it $id bash
48
 
 
 
 
49
  # Clean up
50
  # docker system prune -a --volumes
{weights β†’ data/scripts}/download_weights.sh RENAMED
File without changes
detect.py CHANGED
@@ -63,8 +63,8 @@ def detect(weights='yolov5s.pt', # model.pt path(s)
63
  # Second-stage classifier
64
  classify = False
65
  if classify:
66
- modelc = load_classifier(name='resnet101', n=2) # initialize
67
- modelc.load_state_dict(torch.load('weights/resnet101.pt', map_location=device)['model']).to(device).eval()
68
 
69
  # Set Dataloader
70
  vid_path, vid_writer = None, None
 
63
  # Second-stage classifier
64
  classify = False
65
  if classify:
66
+ modelc = load_classifier(name='resnet50', n=2) # initialize
67
+ modelc.load_state_dict(torch.load('resnet50.pt', map_location=device)['model']).to(device).eval()
68
 
69
  # Set Dataloader
70
  vid_path, vid_writer = None, None