fix: bug of random crop
Browse files- detector/data.py +1 -1
detector/data.py
CHANGED
|
@@ -85,7 +85,7 @@ class RandomCrop(object):
|
|
| 85 |
# crop image
|
| 86 |
image = TF.crop(image, top, left, height, width)
|
| 87 |
|
| 88 |
-
label[[5, 6, 10]] = label[[5, 6, 10]]
|
| 89 |
return image, label
|
| 90 |
|
| 91 |
|
|
|
|
| 85 |
# crop image
|
| 86 |
image = TF.crop(image, top, left, height, width)
|
| 87 |
|
| 88 |
+
label[[5, 6, 10]] = label[[5, 6, 10]] / (1 - random_width)
|
| 89 |
return image, label
|
| 90 |
|
| 91 |
|