himindspore添加骨骼和风格迁移模块 himindspore添加骨骼和风格迁移模块 himindspore添加骨骼和风格迁移模块 去除注释pull/8986/head
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.mindspore.himindspore.base;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.alibaba.android.arouter.BuildConfig;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
|
||||
|
||||
public class MyApplication extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
if (BuildConfig.DEBUG) {
|
||||
ARouter.openLog();
|
||||
ARouter.openDebug();
|
||||
}
|
||||
ARouter.init(this);
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
package com.mindspore.himindspore.base;
|
||||
|
||||
public interface TrackListener {
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package com.mindspore.himindspore.imageclassification.ui;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.mindspore.himindspore.R;
|
||||
|
||||
public class ImageMainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_image_main);
|
||||
|
||||
|
||||
findViewById(R.id.btn_demo).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(ImageMainActivity.this, ImageCameraActivity.class);
|
||||
intent.putExtra(ImageCameraActivity.OPEN_TYPE, ImageCameraActivity.TYPE_DEMO);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.btn_custom).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(ImageMainActivity.this, ImageCameraActivity.class);
|
||||
intent.putExtra(ImageCameraActivity.OPEN_TYPE, ImageCameraActivity.TYPE_CUSTOM);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
package com.mindspore.himindspore.objectdetection.ui;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
|
||||
import com.mindspore.himindspore.R;
|
||||
|
||||
public class ObjectDetectionMainActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
|
||||
private static final int REQUEST_CAMERA_PERMISSION = 2;
|
||||
private static final int REQUEST_PHOTO_PERMISSION = 3;
|
||||
|
||||
private Button btnPhoto, btnCamera;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_object_detection_main);
|
||||
|
||||
btnPhoto = findViewById(R.id.btn_photo);
|
||||
btnCamera = findViewById(R.id.btn_camera);
|
||||
|
||||
btnPhoto.setOnClickListener(this);
|
||||
btnCamera.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (R.id.btn_photo == view.getId()) {
|
||||
ActivityCompat.requestPermissions(this,
|
||||
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_PHONE_STATE}, REQUEST_PHOTO_PERMISSION);
|
||||
} else if (R.id.btn_camera == view.getId()) {
|
||||
ActivityCompat.requestPermissions(this,
|
||||
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_PHONE_STATE, Manifest.permission.CAMERA}, REQUEST_CAMERA_PERMISSION);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Authority application result callback
|
||||
*/
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
if (REQUEST_PHOTO_PERMISSION == requestCode) {
|
||||
choosePhoto();
|
||||
} else if (REQUEST_CAMERA_PERMISSION == requestCode) {
|
||||
chooseCamera();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void choosePhoto() {
|
||||
Intent intent = new Intent(ObjectDetectionMainActivity.this, ObjectPhotoActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void chooseCamera() {
|
||||
Intent intent = new Intent(ObjectDetectionMainActivity.this, ObjectCameraActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
package com.mindspore.himindspore.track;
|
||||
|
||||
public interface TrackListener {
|
||||
}
|
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |