updates
This commit is contained in:
parent
cbd5347cc3
commit
e6e6fb6f57
2
test.py
2
test.py
|
@ -176,7 +176,7 @@ def test(
|
|||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(prog='test.py')
|
||||
parser.add_argument('--batch-size', type=int, default=32, help='size of each image batch')
|
||||
parser.add_argument('--batch-size', type=int, default=3, help='size of each image batch')
|
||||
parser.add_argument('--cfg', type=str, default='cfg/yolov3-spp.cfg', help='cfg file path')
|
||||
parser.add_argument('--data-cfg', type=str, default='data/coco.data', help='coco.data file path')
|
||||
parser.add_argument('--weights', type=str, default='weights/yolov3-spp.weights', help='path to weights file')
|
||||
|
|
|
@ -10,8 +10,8 @@ sudo reboot now
|
|||
|
||||
# Re-clone
|
||||
sudo rm -rf yolov3
|
||||
# git clone https://github.com/ultralytics/yolov3 # master
|
||||
git clone -b test --depth 1 https://github.com/ultralytics/yolov3 yolov3_test # branch
|
||||
git clone https://github.com/ultralytics/yolov3 # master
|
||||
# git clone -b test --depth 1 https://github.com/ultralytics/yolov3 yolov3_test # branch
|
||||
cp -r weights yolov3
|
||||
cp -r cocoapi/PythonAPI/pycocotools yolov3
|
||||
cd yolov3
|
||||
|
@ -50,6 +50,7 @@ git clone https://github.com/ultralytics/yolov3 # master
|
|||
cp -r weights yolov3
|
||||
cp -r cocoapi/PythonAPI/pycocotools yolov3
|
||||
cd yolov3
|
||||
python3 test.py --save-json
|
||||
|
||||
git pull https://github.com/ultralytics/yolov3
|
||||
python3 train.py --data-cfg data/coco_1img.data
|
||||
|
|
|
@ -284,7 +284,7 @@ def compute_loss(p, targets): # predictions, targets
|
|||
|
||||
def build_targets(model, targets):
|
||||
# targets = [image, class, x, y, w, h]
|
||||
if isinstance(model, nn.parallel.DistributedDataParallel):
|
||||
if type(model) in (nn.parallel.DataParallel, nn.parallel.DistributedDataParallel):
|
||||
model = model.module
|
||||
|
||||
txy, twh, tcls, indices = [], [], [], []
|
||||
|
|
Loading…
Reference in New Issue