reformat code

This commit is contained in:
2022-08-18 19:15:16 +02:00
parent 988abb715f
commit 653ee95311
7 changed files with 25 additions and 25 deletions

View File

@ -203,7 +203,7 @@ func addJsonFiles(recordFiles []string, imgCam []string, flipImage bool, w *zip.
if flipImage {
rcd.UserAngle = rcd.UserAngle * -1
rcd.CamImageArray = fmt.Sprintf("flip_%s", camName)
}else {
} else {
rcd.CamImageArray = camName
}

View File

@ -96,7 +96,6 @@ func (r *Record) drawRecord(rec *events.RecordMessage, objects *events.ObjectsMe
r.window.WaitKey(1)
}
func (r *Record) drawSteering(img *gocv.Mat, steering float32) {
gocv.PutText(
img,

View File

@ -20,10 +20,10 @@ func ListModels(ctx context.Context, bucket string) error {
outputs, err := client.ListObjectsV2(
ctx,
&s3.ListObjectsV2Input{
Bucket: aws.String(bucket),
Prefix: aws.String("output"),
Bucket: aws.String(bucket),
Prefix: aws.String("output"),
},
)
)
if err != nil {
return fmt.Errorf("unable to list models in bucket %v: %w", bucket, err)
}
@ -38,7 +38,7 @@ func DownloadArchive(ctx context.Context, bucketName, modelPath string) ([]byte,
l := zap.S().With(
"bucket", bucketName,
"model", modelPath,
)
)
client := s3.NewFromConfig(awsutils.MustLoadConfig())
l.Debug("download model")
@ -46,8 +46,8 @@ func DownloadArchive(ctx context.Context, bucketName, modelPath string) ([]byte,
ctx,
&s3.GetObjectInput{
Bucket: aws.String(bucketName),
Key: aws.String(modelPath),
Bucket: aws.String(bucketName),
Key: aws.String(modelPath),
})
if err != nil {
return nil, fmt.Errorf("unable to download model: %w", err)
@ -70,4 +70,4 @@ func DownloadArchiveToFile(ctx context.Context, bucketName, modelPath, outputFil
return fmt.Errorf("unable to write model '%s' to file '%s': %v", modelPath, outputFile, err)
}
return nil
}
}

View File

@ -1,6 +1,5 @@
package train
const (
prefixInput = "input/data/train/"
prefixInput = "input/data/train/"
)