what-the-bank/sources/com/google/firebase/ml/vision/face/FirebaseVisionFaceDetectorO...

157 lines
5.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.ml.vision.face;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.internal.firebase_ml.zzkj;
import com.google.android.gms.internal.firebase_ml.zzmd;
import com.google.android.gms.internal.firebase_ml.zzue;
/* loaded from: classes2.dex */
public class FirebaseVisionFaceDetectorOptions {
private final boolean trackingEnabled;
private final int zzayf;
private final int zzayg;
private final int zzayh;
private final int zzayi;
private final float zzayj;
private FirebaseVisionFaceDetectorOptions(int i, int i2, int i3, int i4, boolean z, float f) {
this.zzayf = i;
this.zzayg = i2;
this.zzayh = i3;
this.zzayi = i4;
this.trackingEnabled = z;
this.zzayj = f;
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof FirebaseVisionFaceDetectorOptions)) {
return false;
}
FirebaseVisionFaceDetectorOptions firebaseVisionFaceDetectorOptions = (FirebaseVisionFaceDetectorOptions) obj;
return Float.floatToIntBits(this.zzayj) == Float.floatToIntBits(firebaseVisionFaceDetectorOptions.zzayj) && this.zzayf == firebaseVisionFaceDetectorOptions.zzayf && this.zzayg == firebaseVisionFaceDetectorOptions.zzayg && this.zzayi == firebaseVisionFaceDetectorOptions.zzayi && this.trackingEnabled == firebaseVisionFaceDetectorOptions.trackingEnabled && this.zzayh == firebaseVisionFaceDetectorOptions.zzayh;
}
/* loaded from: classes2.dex */
public static class Builder {
private int zzayf = 1;
private int zzayg = 1;
private int zzayh = 1;
private int zzayi = 1;
private boolean trackingEnabled = false;
private float zzayj = 0.1f;
public FirebaseVisionFaceDetectorOptions build() {
return new FirebaseVisionFaceDetectorOptions(this.zzayf, this.zzayg, this.zzayh, this.zzayi, this.trackingEnabled, this.zzayj);
}
public Builder setPerformanceMode(int i) {
this.zzayi = i;
return this;
}
public Builder setMinFaceSize(float f) {
this.zzayj = f;
return this;
}
public Builder setLandmarkMode(int i) {
this.zzayf = i;
return this;
}
public Builder setContourMode(int i) {
this.zzayg = i;
return this;
}
public Builder setClassificationMode(int i) {
this.zzayh = i;
return this;
}
public Builder enableTracking() {
this.trackingEnabled = true;
return this;
}
}
public int hashCode() {
return Objects.hashCode(Integer.valueOf(Float.floatToIntBits(this.zzayj)), Integer.valueOf(this.zzayf), Integer.valueOf(this.zzayg), Integer.valueOf(this.zzayi), Boolean.valueOf(this.trackingEnabled), Integer.valueOf(this.zzayh));
}
public String toString() {
return zzkj.zzaz("FaceDetectorOptions").zzb("landmarkMode", this.zzayf).zzb("contourMode", this.zzayg).zzb("classificationMode", this.zzayh).zzb("performanceMode", this.zzayi).zza("trackingEnabled", this.trackingEnabled).zza("minFaceSize", this.zzayj).toString();
}
public final zzmd.zzp zznn() {
zzmd.zzp.zzd zzdVar;
zzmd.zzp.zzb zzbVar;
zzmd.zzp.zze zzeVar;
zzmd.zzp.zzc zzcVar;
zzmd.zzp.zza zzju = zzmd.zzp.zzju();
int i = this.zzayf;
if (i == 1) {
zzdVar = zzmd.zzp.zzd.NO_LANDMARKS;
} else if (i == 2) {
zzdVar = zzmd.zzp.zzd.ALL_LANDMARKS;
} else {
zzdVar = zzmd.zzp.zzd.UNKNOWN_LANDMARKS;
}
zzmd.zzp.zza zzb = zzju.zzb(zzdVar);
int i2 = this.zzayh;
if (i2 == 1) {
zzbVar = zzmd.zzp.zzb.NO_CLASSIFICATIONS;
} else if (i2 == 2) {
zzbVar = zzmd.zzp.zzb.ALL_CLASSIFICATIONS;
} else {
zzbVar = zzmd.zzp.zzb.UNKNOWN_CLASSIFICATIONS;
}
zzmd.zzp.zza zzb2 = zzb.zzb(zzbVar);
int i3 = this.zzayi;
if (i3 == 1) {
zzeVar = zzmd.zzp.zze.FAST;
} else if (i3 == 2) {
zzeVar = zzmd.zzp.zze.ACCURATE;
} else {
zzeVar = zzmd.zzp.zze.UNKNOWN_PERFORMANCE;
}
zzmd.zzp.zza zzb3 = zzb2.zzb(zzeVar);
int i4 = this.zzayg;
if (i4 == 1) {
zzcVar = zzmd.zzp.zzc.NO_CONTOURS;
} else if (i4 == 2) {
zzcVar = zzmd.zzp.zzc.ALL_CONTOURS;
} else {
zzcVar = zzmd.zzp.zzc.UNKNOWN_CONTOURS;
}
return (zzmd.zzp) ((zzue) zzb3.zzb(zzcVar).zzv(isTrackingEnabled()).zzn(this.zzayj).zzrj());
}
public boolean isTrackingEnabled() {
return this.trackingEnabled;
}
public int getPerformanceMode() {
return this.zzayi;
}
public float getMinFaceSize() {
return this.zzayj;
}
public int getLandmarkMode() {
return this.zzayf;
}
public int getContourMode() {
return this.zzayg;
}
public int getClassificationMode() {
return this.zzayh;
}
}